| Conditions | 3 |
| Paths | 4 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 59 | public function render($request, \Throwable $exception) |
||
| 60 | { |
||
| 61 | if ($exception instanceof \Spatie\Permission\Exceptions\UnauthorizedException) { |
||
| 62 | abort(401); |
||
| 63 | } |
||
| 64 | if ($exception instanceof \Illuminate\Session\TokenMismatchException) { |
||
| 65 | return redirect() |
||
| 66 | ->back() |
||
| 67 | ->withInput($request->except(['password', 'password_confirmation'])) |
||
| 68 | ->with('error', 'The form has expired due to inactivity. Please refresh the page and try again'); |
||
| 69 | } |
||
| 70 | |||
| 71 | return parent::render($request, $exception); |
||
| 72 | } |
||
| 74 |