lundi 22 octobre 2018

Zizaco/Entrust multiple method filters

I need to give admin access to all methods in controller, but only to some for customer-admin.

I tried to go with this

public function __construct()
{
    $this->middleware('auth');
    $this->middleware('permission:customer-admin')->only(['show', 'edit', 'update', 'upload_picture']); // should give access to select methods
    $this->middleware('role:admin'); // should give access to all methods
}

But it seems that admin-customer middleware rules out admin.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire