this is the handler class and i have override the method for guest protected function unauthenticated($request, AuthenticationException $exception) { return $request->expectsJson() ? response()->json(['message' => $exception->getMessage()], 401) : redirect()->guest(route('admin')); }
my routes file has these routes that i want to reach Route::get('admin','Admin\AdminController@createAdminform'); Route::post('admin','Admin\AdminController@adminLogin');
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire