| Conditions | 2 |
| Paths | 2 |
| Total Lines | 19 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 3 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 42 | public function handle($request, Closure $next, $role) |
||
|
|
|||
| 43 | { |
||
| 44 | if (!$this->auth->check()) { |
||
| 45 | return redirect()->to('/login') |
||
| 46 | ->with('status', 'success') |
||
| 47 | ->with('message', 'Please login.'); |
||
| 48 | } |
||
| 49 | //////////////// |
||
| 50 | // if($role == 'all') |
||
| 51 | // { |
||
| 52 | // return $next($request); |
||
| 53 | // } |
||
| 54 | |||
| 55 | // if( $this->auth->guest() || !$this->auth->user()->hasRole($role)) |
||
| 56 | // { |
||
| 57 | // abort(403); |
||
| 58 | // } |
||
| 59 | //////////////// |
||
| 60 | return $next($request); |
||
| 61 | } |
||
| 70 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.