Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

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('/');
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Argument #passed #instance #instance #IlluminateAuthAuthenticationException
ADD COMMENT
Topic
Name
6+3 =