Answer the question
In order to leave comments, you need to log in
Laravel 5.3 - Throws an AuthenticationException after installing the graham-campbell (Laravel Exceptions) package. How to setup?
Laravel 5.3 - after installing the graham-campbell package (Laravel Exceptions), it throws an AuthenticationException (it is expected that, as with the standard handler, it should redirect to the login page).
Tried to dig into the ..\graham-campbell\exceptions\config\exceptions.php file, but found no visible reaction.
How can you set up?
Answer the question
In order to leave comments, you need to log in
in the app\Exceptions\Handler.php file, replace the render function with the following:
public function render($request, Exception $exception)
{
/**
* in GrahamCampbell\Exceptions doesn't invoke method 'unauthenticated'
* so we need to invoke this method by self
*/
if (get_class($exception) == 'Illuminate\Auth\AuthenticationException') {
return $this->unauthenticated($request, $exception);
}
return parent::render($request, $exception);
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question