Class #39;IlluminateFoundationApplication#39; not found Laravel(Laravel 未找到“IlluminateFoundationApplication类)
问题描述
我通过 composer 安装了 Guzzle,但收到了这个错误,
I installed via composer the Guzzle and i received this error,
> @php artisan package:discover
PHP Fatal error: Uncaught Error: Class 'IlluminateFoundationApplication' not found in /home/vagrant/PROJ/memo/laravel_project/bootstrap/app.php:14
Stack trace:
#0 /home/vagrant/PROJ/memo/laravel_project/artisan(20): require_once()
#1 {main}
thrown in /home/vagrant/PROJ/memo/laravel_project/bootstrap/app.php on line 14
Fatal error: Uncaught Error: Class 'IlluminateFoundationApplication' not found in /home/vagrant/PROJ/memo/laravel_project/bootstrap/app.php:14
Stack trace:
#0 /home/vagrant/PROJ/memo/laravel_project/artisan(20): require_once()
#1 {main}
thrown in /home/vagrant/PROJ/memo/laravel_project/bootstrap/app.php on line 14
Script @php artisan package:discover handling the post-autoload-dump event returned with error code 255
这之前可以工作,现在我检查了 DIR 路径,一切正常.我还尝试了 composer dump-autoload、composer update、删除 composer.lock 和 vendor、composer install
this was working before, and now i checked the DIR path and it's all ok. I also tried composer dump-autoload, composer update, removing composer.lock and vendor, composer install
推荐答案
删除 vendor 文件夹和 composer.lock.
Delete vendor folder and composer.lock.
之后
作曲家安装
然后
作曲家更新 --no-scripts
试试这个,这将解决你的错误.注意:请确保您拥有 composer.json 中的所有包.
Try this, this will solve your error. Note: Please make sure you have all packages in composer.json.
这篇关于Laravel 未找到“IlluminateFoundationApplication"类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Laravel 未找到“IlluminateFoundationApplication"类
基础教程推荐
- 通过 PHP SoapClient 请求发送原始 XML 2021-01-01
- 在多维数组中查找最大值 2021-01-01
- 如何在 PHP 中的请求之间持久化对象 2022-01-01
- Libpuzzle 索引数百万张图片? 2022-01-01
- mysqli_insert_id 是否有可能在高流量应用程序中返回 2021-01-01
- 超薄框架REST服务两次获得输出 2022-01-01
- XAMPP 服务器不加载 CSS 文件 2022-01-01
- WooCommerce 中选定产品类别的自定义产品价格后缀 2021-01-01
- 在 Woocommerce 中根据运输方式和付款方式添加费用 2021-01-01
- 在 PHP 中强制下载文件 - 在 Joomla 框架内 2022-01-01