LoginSignup
1
0

More than 3 years have passed since last update.

Illuminate\Auth\AuthenticationException: Unauthenticated.というエラーについて

Posted at

laravelのバージョンが5.5からunauthenticatedメソッドの場所が変わったから。
https://teratail.com/questions/97310

私はhandler.phpに

handler.php
 protected function unauthenticated($request, AuthenticationException $exception) 
     { 
         return $request->expectsJson() 
                     ? response()->json(['message' => 'Unauthenticated.'], 401) 
                     : redirect()->guest(route('login')); 
     } 

と書きました
以下参考↓
https://github.com/laravel/framework/commit/11b0de0485632d5712f7fb59071a4acbc4af2bdc

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0