1 /App/Http/Controllers 目录下有正式文件DetailController namespace AppHttpControllers;
2 /App/Http/Controllers/backup目录下有备份文件DetailController namespace AppHttpControllers;
3 由于命名空间相同,导致指向DetailController 的路由解析到了backup那一个文件
4 已尝试方法:
删除backup文件 ,无效
artisan route:clear , 无效
在路由中点击Ctrl + 左键点击DetailControler phpStrom编辑器可以跳转到正确文件
5 报错
2/2
ReflectionException in Route.php line 280:
Class AppHttpControllersDetailController does not exist
1/2
ErrorException in ClassLoader.php line 440:
include(D:workspacelaravel-5.2vendorcomposer/../../app/Http/Controllers/backup/DetailController.php): failed to open stream: No such file or directory
プロジェクトのルートディレクトリで実行して
composer dumpautoload
見てみましょう