Conditions | 5 |
Paths | 2 |
Total Lines | 16 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php namespace Spatie\Permission\Commands; |
||
27 | protected function getRouteInformation(Route $route) |
||
28 | { |
||
29 | $actions = explode('@',$route->getActionName()); |
||
30 | $middleware = implode(',',$route->middleware()); |
||
31 | |||
32 | if(!strpos($middleware, 'role')) { |
||
33 | return $this->filterRoute([ |
||
34 | 'method' => implode('|', $route->methods()), |
||
35 | 'uri' => $route->uri(), |
||
36 | 'name' => is_string($route->getName()) ? "<fg=green>{$route->getName()}</>" : "-", |
||
37 | 'controller' => isset($actions[0]) ? "<fg=cyan>{$actions[0]}</>" : "-", |
||
38 | 'action' => isset($actions[1]) ? "<fg=red>{$actions[1]}</>" : "-", |
||
39 | 'middleware' => $middleware |
||
40 | ]); |
||
41 | } |
||
42 | } |
||
43 | } |
||
44 |