Redirect to login page on expired session

https://github.com/LinkStackOrg/LinkStack/issues/598
This commit is contained in:
Julian Prieber 2023-10-18 15:21:35 +02:00
parent 350d0e02be
commit d7d6256f14
1 changed files with 6 additions and 0 deletions

View File

@ -37,5 +37,11 @@ class Handler extends ExceptionHandler
$this->reportable(function (Throwable $e) {
//
});
$this->renderable(function (\Exception $e) {
if ($e->getPrevious() instanceof \Illuminate\Session\TokenMismatchException) {
return redirect()->route('login');
};
});
}
}