我需要授予admin
对控制器中所有方法的访问权限,但仅限于一些 for customer-admin
.
我试着用这个
public function __construct()
{
$this->middleware('auth');
$this->middleware('role:customer-admin')->only(['show', 'edit', 'update', 'upload_picture']); // should give access to select methods
$this->middleware('role:admin'); // should give access to all methods
}
但似乎在这种情况下你必须同时符合两者。