php - Laravel namespace contains files with the same name causing route resolution errors
滿天的星座
滿天的星座 2017-05-16 13:07:05
0
1
524

1 There are official files in the directory /App/Http/Controllers DetailController namespace AppHttpControllers;
2 There are backup files in the directory /App/Http/Controllers/backup DetailController namespace AppHttpControllers;
3 Because the namespace is the same, it points to DetailController The route resolves to the backup file
4 Tried methods:
Delete the backup file, invalid
artisan route:clear, invalid
Click Ctrl + left-click DetailControler in the route phpStrom editor can Jump to the correct file
5 Error
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

滿天的星座
滿天的星座

reply all(1)
左手右手慢动作

Run in the project root directory composer dumpautoload and take a look

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template