Argument 2 passed to AppExceptionsHandler::unauthenticated() must be an instance of AppExceptionsAuthenticationException, instance of IlluminateAuthAuthenticationException given
protected function unauthenticated($request, AuthenticationException $exception)
{
if ($request->expectsJson()) {
return response()->json(['error' => 'Unauthenticated.'], 401);
}
return redirect()->guest('/');
}