Laravel:类应用程序\控制台\命令\ BlockModelsDidNotShowUp不存在
问题描述:
我想在我的生产服务器上运行的项目和composer update
我不断收到此错误:Laravel:类应用程序控制台命令 BlockModelsDidNotShowUp不存在
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating autoload files
> Illuminate\Foundation\ComposerScripts::postUpdate
> php artisan optimize
[ReflectionException]
Class App\Console\Commands\BlockModelsDidNotShowUp does not exist
Script php artisan optimize handling the post-update-cmd event returned with error code 1
此之前,我有一个权限被拒绝错误,因为/storage/logs/laravel.log file
- 我已经更新了该文件的权限,并且不断收到上面的错误。
我试过this,但我没有bootstrap/cache/compiled.php
文件。
答
如果你删除了这个类,只需清除缓存中:
php artisan clear-compiled
或手动删除bootstrap/cache/services.php
文件。
+1
谢谢!这工作:) – omerowitz
尝试'composer dump-autoload'并重新运行;可能会解决它 –