Commit 881d7efa authored by Nicolas Widart's avatar Nicolas Widart

Merge commit '267637ef'

* commit '267637ef':
  Squashed 'Modules/Workshop/' changes from 31cd758..a484d0e
parents 98b4c6ad 267637ef
<?php namespace Modules\Workshop\Composers; <?php namespace Modules\Workshop\Composers;
use Illuminate\Contracts\View\View;
use Illuminate\Support\Collection; use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Request; use Illuminate\Support\Facades\Request;
use Modules\Core\Composers\BaseSidebarViewComposer;
class SidebarViewComposer class SidebarViewComposer extends BaseSidebarViewComposer
{ {
public function compose($view) public function compose(View $view)
{ {
$view->items->put('workbench', Collection::make([ $view->items->put('workbench', Collection::make([
[ [
...@@ -14,18 +16,21 @@ class SidebarViewComposer ...@@ -14,18 +16,21 @@ class SidebarViewComposer
'route' => '#', 'route' => '#',
'icon-class' => 'fa fa-cogs', 'icon-class' => 'fa fa-cogs',
'title' => 'Workshop', 'title' => 'Workshop',
'permission' => $this->auth->hasAccess('modules.index') or $this->auth->hasAccess('workbench.index')
], ],
[ [
'request' => "*/{$view->prefix}/modules*", 'request' => "*/{$view->prefix}/modules*",
'route' => 'dashboard.modules.index', 'route' => 'dashboard.modules.index',
'icon-class' => 'fa fa-cog', 'icon-class' => 'fa fa-cog',
'title' => 'Modules', 'title' => 'Modules',
'permission' => $this->auth->hasAccess('modules.index')
], ],
[ [
'request' => "*/{$view->prefix}/workbench*", 'request' => "*/{$view->prefix}/workbench*",
'route' => 'dashboard.workbench.index', 'route' => 'dashboard.workbench.index',
'icon-class' => 'fa fa-terminal', 'icon-class' => 'fa fa-terminal',
'title' => 'Workbench', 'title' => 'Workbench',
'permission' => $this->auth->hasAccess('workbench.index')
] ]
])); ]));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment