I was trying to list all the routes of my app so I tried php artisan route:list.
and this is the error I got see the below code. Note that my current app name is 'App' and 'laravel5learning' is my previous app name. How can I fix this?
[Symfony\Component\Debug\Exception\FatalErrorException]
Class 'laravel5learning\Http\Controllers\Controller' not found
@mikro123456 The full stacktrace should tell you where the problem is. Are you still using the namespace laravel5learning somewhere, copied some files from the previous project?
@skillche This is the same project, I just changed my app name from 'laravel5learning' to the default 'App' name. This is working fine but when I tried to list all my routes using php artisan route:list and I get that error
@mikro123456 I understand, I ran into this problem after renaming one my first Laravel applications as well. There still has to be a reference to the old name somewhere. If you are using an IDE like PHPStorm do a full search (Edit->Find->Find in Path) of "laravel5learning" across all files in your project directory and all sub-directories.
Well, thanks to you guys I already fixed this issue just like @skliche suggested I find all the occurrences of 'laravel5learning' namespace on my app and I found out that the package that I just require using composer was using the previous namespace 'laravel5learning' and then I changed it to 'App' again and 'route:list' is already working smoothly.