| Total Complexity | 2 |
| Total Lines | 13 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | class Authenticate extends Middleware |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * Get the path the user should be redirected to when they are not authenticated. |
||
| 11 | * |
||
| 12 | * @param \Illuminate\Http\Request $request |
||
| 13 | * |
||
| 14 | * @return string|mixed |
||
| 15 | */ |
||
| 16 | protected function redirectTo($request) |
||
| 17 | { |
||
| 18 | if (!$request->expectsJson()) { |
||
| 19 | return route('login'); |
||
| 20 | } |
||
| 23 |