| Conditions | 1 |
| Paths | 1 |
| Total Lines | 19 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php namespace Modules\Page\Sidebar; |
||
| 32 | public function extendWith(Menu $menu) |
||
| 33 | { |
||
| 34 | $menu->group(trans('core::sidebar.content'), function (Group $group) { |
||
| 35 | $group->item(trans('page::pages.title.pages'), function (Item $item) { |
||
| 36 | $item->icon('fa fa-file'); |
||
| 37 | $item->weight(1); |
||
| 38 | $item->route('admin.page.page.index'); |
||
| 39 | $item->badge(function (Badge $badge, PageRepository $page) { |
||
| 40 | $badge->setClass('bg-green'); |
||
| 41 | $badge->setValue($page->countAll()); |
||
| 42 | }); |
||
| 43 | $item->authorize( |
||
| 44 | $this->auth->hasAccess('page.pages.index') |
||
| 45 | ); |
||
| 46 | }); |
||
| 47 | }); |
||
| 48 | |||
| 49 | return $menu; |
||
| 50 | } |
||
| 51 | } |
||
| 52 |