| 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 | * @return string |
||
| 14 | */ |
||
| 15 | 204 | protected function redirectTo($request) |
|
| 16 | { |
||
| 17 | 204 | if(!$request->expectsJson()) |
|
| 18 | { |
||
| 19 | 204 | return route('login'); |
|
| 20 | } |
||
| 21 | } |
||
| 22 | } |
||
| 23 |