| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | protected function checkPermission(User $user, $description) |
||
| 14 | { |
||
| 15 | $allowed = UserRolePermissions::whereRoleId($user->role_id)->whereHas('UserRolePermissionTypes', function($q) use ($description) |
||
| 16 | { |
||
| 17 | $q->where('description', $description); |
||
| 18 | })->first(); |
||
| 19 | |||
| 20 | if($allowed) |
||
| 21 | { |
||
| 22 | return $allowed->allow; |
||
| 23 | } |
||
| 24 | |||
| 25 | return false; |
||
| 26 | } |
||
| 28 |