Skip to content

Commit d7d6256

Browse files
committed
Redirect to login page on expired session
#598
1 parent 350d0e0 commit d7d6256

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

app/Exceptions/Handler.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,11 @@ public function register()
3737
$this->reportable(function (Throwable $e) {
3838
//
3939
});
40+
41+
$this->renderable(function (\Exception $e) {
42+
if ($e->getPrevious() instanceof \Illuminate\Session\TokenMismatchException) {
43+
return redirect()->route('login');
44+
};
45+
});
4046
}
4147
}

0 commit comments

Comments
 (0)