redirect to login page on 403
This commit is contained in:
parent
acff97dfb2
commit
94d0e15080
@ -44,6 +44,11 @@ class Handler extends ExceptionHandler
|
||||
*/
|
||||
public function render($request, Exception $exception)
|
||||
{
|
||||
if ($exception instanceof \Symfony\Component\HttpKernel\Exception\HttpException
|
||||
&& $exception->getStatusCode() == 403) {
|
||||
return redirect()->guest('login');
|
||||
}
|
||||
|
||||
return parent::render($request, $exception);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user