| @@ 39-45 (lines=7) @@ | ||
| 36 | foreach ($list as $key => $items) { |
|
| 37 | if (is_string($items)) { |
|
| 38 | if (Route::has($items)) { |
|
| 39 | if (Auth::user()->can($items)) { |
|
| 40 | $menus->push([ |
|
| 41 | 'title' => $key, |
|
| 42 | 'url' => route($items, [], false), |
|
| 43 | 'child' => [], |
|
| 44 | ]); |
|
| 45 | } |
|
| 46 | } else { |
|
| 47 | $config = $this->getConfig($items); |
|
| 48 | if ($config && $config->getAttribute('permissions.view')) { |
|
| @@ 33-39 (lines=7) @@ | ||
| 30 | foreach ($list as $key => $items) { |
|
| 31 | if (is_string($items)) { |
|
| 32 | if (Route::has($items)) { |
|
| 33 | if (Auth::user()->can($items)) { |
|
| 34 | $menus->push([ |
|
| 35 | 'title' => $key, |
|
| 36 | 'url' => route($items, [], false), |
|
| 37 | 'child' => [], |
|
| 38 | ]); |
|
| 39 | } |
|
| 40 | } else { |
|
| 41 | $config = app('admin.config.factory')->make($items); |
|
| 42 | if ($config && $config->getAttribute('permissions.view')) { |
|