I am developing an api rest using laravel and to create this api I am using the tutorial:
But when you run the command:
php artisan route:list
I get the following error:
ReflectionException:Class App\Http\Controllers\pagesController does not exist
at /var/www/html/freelance/HQ Alma/api/vendor/laravel/framework/src/Illuminate/Container/Container.php:7
79
775| if ($concrete instanceof Closure) {
776| return $concrete($this, $this->getLastParameterOverride());
777|}
778|
779|$reflector = new ReflectionClass($concrete);
780|
781|// If the type is not instantiable, the developer is attempting to resolve
782|// an abstract type such as an Interface of Abstract Class and there is
783|// no binding registered for the abstractions so we need to bail out.
Exception trace:
1 ReflectionClass::__construct("App\Http\Controllers\pagesController")
/var/www/html/freelance/HQ Alma/api/vendor/laravel/framework/src/Illuminate/Container/Container.php:779
2 Illuminate\Container\Container::build("App\Http\Controllers\pagesController")
/var/www/html/freelance/HQ Alma/api/vendor/laravel/framework/src/Illuminate/Container/Container.php:658
Please use the argument -v to see more details.
My routes are these:
Route::group(array('prefix' => 'hqi'), function()
{
Route::get('/', function () {
return response()->json(['message' => 'HQI API', 'status' =>
'Connected']);;
});
Route::resource('users', 'UserController');
Route::resource('pages', 'PagesController');
Route::resource('palestra', 'PalestrasDivulgacaoController');
});
Route::get('/', function () {
return redirect('api');
});
Would anyone know what it could be?