Conditions | 3 |
Paths | 5 |
Total Lines | 13 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 3.0261 |
Changes | 0 |
1 | <?php |
||
17 | 8 | public function handle($request, Closure $next, ...$guards) |
|
18 | { |
||
19 | try { |
||
20 | 8 | if ((float) str_limit(app()->version(), 3, '') >= 5.7) { |
|
|
|||
21 | $this->authenticate($request, ['laractive-admin']); |
||
22 | } else { |
||
23 | 8 | parent::authenticate(['laractive-admin']); |
|
24 | } |
||
25 | 1 | } catch (AuthenticationException $e) { |
|
26 | 1 | return redirect()->guest(route('admin.login')); |
|
27 | } |
||
28 | |||
29 | 7 | return $next($request); |
|
30 | } |
||
32 |