Conditions | 3 |
Paths | 4 |
Total Lines | 12 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
26 | public function handle($request, Closure $next, $guard = null) |
||
27 | { |
||
28 | try { |
||
29 | if ($this->auth->guard($guard)->guest()) { |
||
30 | throw new RestrictAccessException(); |
||
31 | } |
||
32 | |||
33 | return $next($request); |
||
34 | } catch (RestrictAccessException $e) { |
||
35 | abort(401, $e->getMessage()); |
||
36 | } |
||
37 | } |
||
38 | } |
||
39 |