Conditions | 5 |
Paths | 3 |
Total Lines | 8 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
9 | public function nomadicCan($verb) |
||
10 | { |
||
11 | if ($this->indexCollection()->count() > 0 && in_array($verb, ['create', 'store'])) { |
||
|
|||
12 | throw NotAllowedManagerRoute::create($this); |
||
13 | } |
||
14 | |||
15 | if (! auth()->guard('chief')->user()->hasRole('developer') && in_array($verb, ['create', 'store', 'delete'])) { |
||
16 | throw NotAllowedManagerRoute::notAllowedVerb($verb, $this); |
||
17 | } |
||
20 |