I have a custom login page for my laravel app. However, i have modified my Handler.php to first look like this
protected function unauthenticated($request, AuthenticationException $exception)
{
if ($request->expectsJson()) {
return response()->json(['error' => 'Unauthenticated.'], 401);
}
return redirect()->guest('login');
}
and even tried like this
protected function unauthenticated($request, AuthenticationException $exception)
{
if ($request->expectsJson()) {
return response()->json(['error' => 'Unauthenticated.'], 401);
}
return redirect('login');
}
However, once i get to login, i get this error
How can i fix this problem?.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire