php artisan route:list ,laravel 5.5

php artisan route:list ,laravel 5.5

php artisan route:list -v

In Container.php line 752:

  [ReflectionException (-1)]
  Class App\Http\Controllers\RollController does not exist


Exception trace:
 ReflectionClass->__construct() at C:\wamp64\www\laravel\tuto55\vendor\laravel\framework\src\Illuminate\Container\Container.php:752
 Illuminate\Container\Container->build() at C:\wamp64\www\laravel\tuto55\vendor\laravel\framework\src\Illuminate\Container\Container.php:631
 Illuminate\Container\Container->resolve() at C:\wamp64\www\laravel\tuto55\vendor\laravel\framework\src\Illuminate\Container\Container.php:586
 Illuminate\Container\Container->make() at C:\wamp64\www\laravel\tuto55\vendor\laravel\framework\src\Illuminate\Foundation\Application.php:732
 Illuminate\Foundation\Application->make() at C:\wamp64\www\laravel\tuto55\vendor\laravel\framework\src\Illuminate\Routing\Route.php:226
 Illuminate\Routing\Route->getController() at C:\wamp64\www\laravel\tuto55\vendor\laravel\framework\src\Illuminate\Routing\Route.php:796
 Illuminate\Routing\Route->controllerMiddleware() at C:\wamp64\www\laravel\tuto55\vendor\laravel\framework\src\Illuminate\Routing\Route.php:757
 Illuminate\Routing\Route->gatherMiddleware() at C:\wamp64\www\laravel\tuto55\vendor\laravel\framework\src\Illuminate\Foundation\Console\RouteListCommand.php:151
 Illuminate\Foundation\Console\RouteListCommand->getMiddleware() at C:\wamp64\www\laravel\tuto55\vendor\laravel\framework\src\Illuminate\Foundation\Console\RouteListCommand.php:114
 Illuminate\Foundation\Console\RouteListCommand->getRouteInformation() at C:\wamp64\www\laravel\tuto55\vendor\laravel\framework\src\Illuminate\Foundation\Console\RouteListCommand.php:86
 Illuminate\Foundation\Console\RouteListCommand->Illuminate\Foundation\Console\{closure}() at n/a:n/a
 array_map() at C:\wamp64\www\laravel\tuto55\vendor\laravel\framework\src\Illuminate\Support\Collection.php:861
 Illuminate\Support\Collection->map() at C:\wamp64\www\laravel\tuto55\vendor\laravel\framework\src\Illuminate\Foundation\Console\RouteListCommand.php:87
 Illuminate\Foundation\Console\RouteListCommand->getRoutes() at C:\wamp64\www\laravel\tuto55\vendor\laravel\framework\src\Illuminate\Foundation\Console\RouteListCommand.php:75
 Illuminate\Foundation\Console\RouteListCommand->handle() at n/a:n/a
 call_user_func_array() at C:\wamp64\www\laravel\tuto55\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php:29
 Illuminate\Container\BoundMethod::Illuminate\Container\{closure}() at C:\wamp64\www\laravel\tuto55\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php:87
 Illuminate\Container\BoundMethod::callBoundMethod() at C:\wamp64\www\laravel\tuto55\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php:31
 Illuminate\Container\BoundMethod::call() at C:\wamp64\www\laravel\tuto55\vendor\laravel\framework\src\Illuminate\Container\Container.php:549
 Illuminate\Container\Container->call() at C:\wamp64\www\laravel\tuto55\vendor\laravel\framework\src\Illuminate\Console\Command.php:183
 Illuminate\Console\Command->execute() at C:\wamp64\www\laravel\tuto55\vendor\symfony\console\Command\Command.php:252
 Symfony\Component\Console\Command\Command->run() at C:\wamp64\www\laravel\tuto55\vendor\laravel\framework\src\Illuminate\Console\Command.php:170
 Illuminate\Console\Command->run() at C:\wamp64\www\laravel\tuto55\vendor\symfony\console\Application.php:946
 Symfony\Component\Console\Application->doRunCommand() at C:\wamp64\www\laravel\tuto55\vendor\symfony\console\Application.php:248
 Symfony\Component\Console\Application->doRun() at C:\wamp64\www\laravel\tuto55\vendor\symfony\console\Application.php:148
 Symfony\Component\Console\Application->run() at C:\wamp64\www\laravel\tuto55\vendor\laravel\framework\src\Illuminate\Console\Application.php:88
 Illuminate\Console\Application->run() at C:\wamp64\www\laravel\tuto55\vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php:121
 Illuminate\Foundation\Console\Kernel->handle() 

此问题背后的可能原因:

  1. Class 名称和文件名不正确或不相同
  2. 命名空间不正确。根据错误名称空间应该是 namespace App\Http\Controllers;