Commit 1bd792e9 authored by Nicolas Widart's avatar Nicolas Widart

Fixing the request check

parent 20437264
<?php namespace Modules\User\Composers;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Request;
class SidebarViewComposer
{
......@@ -9,19 +10,19 @@ class SidebarViewComposer
$view->items->put('user', Collection::make([
[
'weight' => '1',
'request' => "{$view->prefix}/users*",
'request' => Request::is("{$view->prefix}/users*") or Request::is("{$view->prefix}/roles*"),
'route' => '#',
'icon-class' => 'fa fa-user',
'title' => 'Users & Roles',
],
[
'request' => "{$view->prefix}/users",
'request' => "{$view->prefix}/users*",
'route' => 'dashboard.user.index',
'icon-class' => 'fa fa-user',
'title' => 'Users',
],
[
'request' => "{$view->prefix}/roles",
'request' => "{$view->prefix}/roles*",
'route' => 'dashboard.role.index',
'icon-class' => 'fa fa-flag-o',
'title' => 'Roles',
......
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