Laravel ReflectionException 'Class does not exist' error though everything is perfect

81 Views Asked by At

In my laravel api, I have this folder structure:

Folder Structure

And my code for routes/api.php here

Route::group(['prefix' => 'v1/admin', 'as' => 'api.v1.admin.', 'namespace' => 'Api\V1\Admin'], function () {

    //Page Settings: Favicon, Logo, Title, Metadata
    Route::post('settings/media', [PageSettingsController::class, "storeMedia"])->name('settings.storeMedia');
    Route::apiResource('settings', PageSettingsController::class, ['only' => ['index', 'update']]);

    //About
    Route::apiResource('about', AboutController::class, ['except' => ['show']]);

});

After running php artisan route:list, I am getting this error-

error message

I tried in so many ways, but filed. What can be the reason behind it? Do you have the solution?

0

There are 0 best solutions below