Total Complexity | 2 |
Total Lines | 14 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
34 | class Authenticate extends Middleware |
||
35 | { |
||
36 | /** |
||
37 | * Get the path the user should be redirected to when they are not authenticated. |
||
38 | * |
||
39 | * @param Request $request |
||
40 | * @return string|null |
||
41 | */ |
||
42 | protected function redirectTo($request) |
||
43 | { |
||
44 | if (! $request->expectsJson()) { |
||
45 | return route('login'); |
||
46 | } |
||
47 | return null; |
||
48 | } |
||
50 |