fumeapp/laranuxt

Error target class [web] doesn not exist

Opened this issue · 2 comments

First of all, thank you for this amazing repository. However, it seems I have an issue with the web middleware. Whenever I add the middleware, it causes this error: Target class [web] does not exist. as seen in the figure below. I've tried running php artisan optimize:clear and config:cache but the error still persists.

image

Before submitting this issue, I tried to register Laravel routes for better understanding. Below is the configuration I have:

  1. My RouteServiceProvider Class
public function boot()
  {
          $this->configureRateLimiting();
  
          $this->routes(function () {
              Route::middleware('api')
                  ->prefix('api')
                  ->group(base_path('routes/api.php'));
  
              Route::middleware('web')
                  ->group(base_path('routes/web.php'));
          });
 }
  1. My Http Kernel Class
protected $middlewareGroups = [
        'web' => [
            \App\Http\Middleware\EncryptCookies::class,
            \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
            \Illuminate\Session\Middleware\StartSession::class,
            \Illuminate\View\Middleware\ShareErrorsFromSession::class,
            \App\Http\Middleware\VerifyCsrfToken::class,
            \Illuminate\Routing\Middleware\SubstituteBindings::class,
        ],

        'api' => [
            \Illuminate\Routing\Middleware\ThrottleRequests::class . ':api',
            \Illuminate\Routing\Middleware\SubstituteBindings::class,
        ],
};
  1. My Routes Files

image

These are the configurations I've set up so far. I might be overlooking something. Could you please assist in resolving the issue? Any help would be greatly appreciated.

thanks for reporting an issue, I can take a look into this later today. I also plan to upgrade to Laravel 11 within the week, so stay tuned for that as well.

Thanks and wating for the good news 😄