升级到laravel后调用未定义的方法5.4
问题描述:
我试图从5.3今天将我的项目升级到laravel 5.4。我加升级到laravel后调用未定义的方法5.4
"laravel/framework": "5.4.*",
要我composer.json
和运行命令composer update
然后composer dump-autoload
,然后测试了我的项目。它给我这个错误:
错误:
FatalThrowableError in 2154f392745gf102547be138a945a11b58e5649203.php line 2: Call to undefined method Illuminate\View\Factory::getFirstLoop()
我错过了什么?
答
清除编译的刀片视图。
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
+0
好奇,我试过了这两种方法并仍然看到相同的错误。我有相同的代码在开发工作的开发服务器上被拉下来,然后在我的生产服务器上,它在失败,这很奇怪。 –
getFirstLoop的地点已经更新到关注/ ManagesLoops用不同的名字 https://github.com/laravel/framework/blob/5.4/src/Illuminate/View/Concerns/ManagesLoops.php#L74 它告诉它获取最后一个项目,但具有相同的返回值 https://github.com/laravel/framework/blob/5.3/src/Illuminate/View/Factory.php#L852 – PaladiN