【Laravel】[错误解决] 'Class App\Console\Kernel does not exist'
文章目录
今天用php artisan app:name 更改了app的命名空间名字,然后又用git
恢复到了原来的App命名空间名。 结果直接导致以下错误:
Fatal error: Uncaught exception 'ReflectionException' with message 'Class AppConsoleKernel does not exist'
1、问题
2、解决
# 1. 确定你的引导程序没问题
bootstrap/app.php
# 2. 在项目根目录执行命令
composer dump-autoload
解决方案来自:传送门
为什么要执行 composer dump-autoload ,参考:深入 Composer autoload

评论
登录后参与技术讨论,分享你的经验与见解。
登录 / 注册暂无评论