| Conditions | 2 |
| Paths | 1 |
| Total Lines | 34 |
| Code Lines | 20 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php namespace Modules\User\Sidebar; |
||
| 30 | public function extendWith(Menu $menu) |
||
| 31 | { |
||
| 32 | $menu->group(trans('workshop::workshop.title'), function (Group $group) { |
||
| 33 | |||
| 34 | $group->item(trans('user::users.title.users'), function (Item $item) { |
||
| 35 | $item->weight(0); |
||
| 36 | $item->icon('fa fa-user'); |
||
| 37 | $item->authorize( |
||
| 38 | $this->auth->hasAccess('user.users.index') or $this->auth->hasAccess('user.roles.index') |
||
| 39 | ); |
||
| 40 | |||
| 41 | $item->item(trans('user::users.title.users'), function (Item $item) { |
||
| 42 | $item->weight(0); |
||
| 43 | $item->icon('fa fa-user'); |
||
| 44 | $item->route('admin.user.user.index'); |
||
| 45 | $item->authorize( |
||
| 46 | $this->auth->hasAccess('user.users.index') |
||
| 47 | ); |
||
| 48 | }); |
||
| 49 | |||
| 50 | $item->item(trans('user::roles.title.roles'), function (Item $item) { |
||
| 51 | $item->weight(1); |
||
| 52 | $item->icon('fa fa-flag-o'); |
||
| 53 | $item->route('admin.user.role.index'); |
||
| 54 | $item->authorize( |
||
| 55 | $this->auth->hasAccess('user.roles.index') |
||
| 56 | ); |
||
| 57 | }); |
||
| 58 | }); |
||
| 59 | |||
| 60 | }); |
||
| 61 | |||
| 62 | return $menu; |
||
| 63 | } |
||
| 64 | } |
||
| 65 |