When I went to check for all routes in the command line using php artisan route:list
then this error happens though LoginController is placed on Auth directory.
CodePudding user response:
Issue is regarding your web.php
or api.php
route files. You referenced LoginController class in route files but you either didn't import it as use App\Http\Controllers\LoginController;
or your namespace is incorrect. Make sure your namespace is correct and import the class properly to tackle the problem.
CodePudding user response:
So here is the solution to resolve this error. Remember that if your LoginController is in Auth directory, then you can follow this solution.
composer dump-autoload
php artisan optimize:clear
php artisan config:cache
php artisan cache:clear
Then run php artisan route:list
again. I hope the error has resolved now and your route list has been shown properly.