| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 37 | public function handle(\Illuminate\Http\Request $request, Closure $next) |
||
| 38 | { |
||
| 39 | if (Auth::user()->cannot('isSuperAdmin', Auth::user())) { |
||
| 40 | |||
| 41 | return Redirect::to('auth/login')->with('danger', "Vous n'etes pas authoriser a acéder à cette partie :("); |
||
| 42 | } |
||
| 43 | |||
| 44 | return $next($request); |
||
| 45 | } |
||
| 46 | } |
||
| 47 |
Adding a
@returnannotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.