entrust
entrust copied to clipboard
Help with middleware
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