I have tried to upgrade my project to laravel 5.4 from 5.3 today. I added
"laravel/framework": "5.4.*",
To my composer.json
and run the command composer update
and then composer dump-autoload
and then tested my project. It gives me this error:
Error:
FatalThrowableError in 2154f392745gf102547be138a945a11b58e5649203.php line 2: Call to undefined method Illuminate\\View\\Factory::getFirstLoop()
Did I miss something?
清除已编译的刀片视图。
php artisan view:clear
php artisan cache:clear
Flush the application cache
composer dump-autoload
Generate autoload files
php artisan view:clear
Clear all compiled view files
Delete all files from this path
{project_root}\storage\framework\views
Or Run this in console
php artisan view:clear
After upgrading packages and Laravel to 5.4 , you should run **
php artisan view:clear
** to avoid the mentioned error. further more you may run **
php artisan route:clear
** to flush the route cache. Additionally , you may run
php artisan optimize
at last.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.