有时候当我们将项目从一个服务器迁移到另一个服务器的后,我们一定要记得清理路由等缓存。
不然框架默认读取缓存就会出错。
有可能报错:
There is no existing directory at \"/var/www/html/Mac/storage/logs\" and its not buildable
也有可能报错:
file_put_content() 参数的路径和我们配置的不一样,其实就是读取的缓存。
解决办法:
清理缓存:
php artisan route:clear
php artisan config:clear
php artisan cache:clear
参考:Link