entrust icon indicating copy to clipboard operation
entrust copied to clipboard

Help with middleware

Open SebastianCBA opened this issue 7 years ago • 0 comments

Hi! I have 3 roles (superadmin, admin y seller) superadmin can view, insert, edit and delete (have manage-users permission) admin can view and edit (have edit-users permission) seller can view only... (have view-users permission)

I have this constructor on my Controller

   public function __construct()
    {
        $this->middleware('auth');
        $this->middleware('permission:view-users',   ['only' => ['index']]);
        $this->middleware('permission:edit-users',   ['only' => ['edit', 'index']]);
        $this->middleware('permission:manage-users', ['only' => ['create', 'edit', 'index']]);
    }

but if I logged with a admin or seller user I can't view the users... I can view the users (index method) only when I logged with superadmin.

Can you help me please?

Thanks in advance. Regards

SebastianCBA avatar Jun 27 '18 02:06 SebastianCBA