Prachee
1 month ago
270
4
Laravel

Error while creating custom multi-auth

Posted 1 month ago by Prachee

Fatal error: Uncaught ReflectionException: Class App\Http\Kernel does not exist in C:\xampp\htdocs\CRM\crm-system\vendor\laravel\framework\src\Illuminate\Container\Container.php:809 Stack trace: #0 C:\xampp\htdocs\CRM\crm-system\vendor\laravel\framework\src\Illuminate\Container\Container.php(809): ReflectionClass->__construct('App\Http\Kernel') #1 C:\xampp\htdocs\CRM\crm-system\vendor\laravel\framework\src\Illuminate\Container\Container.php(691): Illuminate\Container\Container->build('App\Http\Kernel') #2 C:\xampp\htdocs\CRM\crm-system\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(796): Illuminate\Container\Container->resolve('App\Http\Kernel', Array, false) #3 C:\xampp\htdocs\CRM\crm-system\vendor\laravel\framework\src\Illuminate\Container\Container.php(269): Illuminate\Foundation\Application->resolve('App\Http\Kernel', Array, false) #4 C:\xampp\htdocs\CRM\crm-system\vendor\laravel\framework\src\Illuminate\Container\Container.php(805): Illuminate\Container\Container->Illuminate\Container{clo in C:\xampp\htdocs\CRM\crm-system\vendor\laravel\framework\src\Illuminate\Container\Container.php on line 811

IN Kernel Middleware added last AdminMiddleware

protected $routeMiddleware = [ 'auth' => \App\Http\Middleware\Authenticate::class, 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, 'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class, 'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class, 'can' => \Illuminate\Auth\Middleware\Authorize::class, 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, 'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class, 'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class, 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, 'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class, 'admin' => AdminMiddleware::class, ];

Please sign in or create an account to participate in this conversation.