| Code Coverage
| Classes and Traits | Functions and Methods | Lines
Total | 0.00% covered (danger) | 0.00% | 0 / 1 | 0.00% covered (danger) | 0.00% | 0 / 1 | CRAP | 0.00% covered (danger) | 0.00% | 0 / 3
Authenticate | 0.00% covered (danger) | 0.00% | 0 / 1 | 0.00% covered (danger) | 0.00% | 0 / 1 | 6.00 | 0.00% covered (danger) | 0.00% | 0 / 3
redirectTo | 0.00% covered (danger) | 0.00% | 0 / 1 | 6.00 | 0.00% covered (danger) | 0.00% | 0 / 3

1 | <?php
2 |
3 | namespace App\Http\Middleware;
4 |
5 | use Illuminate\Auth\Middleware\Authenticate as Middleware;
6 |
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 | protected function redirectTo($request)
16 | {
17 | if ( $request->expectsJson()) {
18 | return route('notLogin');
19 | }
20 | }
21 | }