Fatal error: Class ‘Illuminate\Foundation\Application’ not found
question
I am getting following error when I open my site which is made using laravel 5
Fatal error: Class 'Illuminate\Foundation\Application' not found in C:\cms\bootstrap\app.php on line 14
I have tried removing vendor folder and composer.lock file and running composer install it's not working I tried running PHP artisan optimize but it shows error
Fatal error: Class'Illuminate\Foundation\Application' not found
Is there any way to solve this problem?
Edited: This problem aroused as soon as I used the php artisan make:model Page command which did create the model but then the above error gets displayed when I access the site Also If use the Larvel's Local Development Server no such problem arises only if I use wamp server
Solution
In my situation, I didn't have the full vendor dependencies in place (composer file was messed up during original install) - so running any artisan commands caused a failure.
I was able to use the --no-scripts flag to prevent artisan from executing before it was included. Once my dependencies were in place, everything worked as expected.
composer update --no-scripts
当使用 Laravel 5 开发的网站遇到 'IlluminateFoundationApplication' 类未找到的错误时,可能是因为缺少完整依赖包或 composer 文件在原始安装过程中被破坏。通过运行 `composer update --no-scripts` 命令并使用 `--no-scripts` 参数防止 artisan 命令执行前依赖注入,可以解决此问题。
5201

被折叠的 条评论
为什么被折叠?



