Support the ongoing development of →
Configuration Packages Security
Last updated 1 year ago.

I suggest you to try this code for middleware

         $this->middleware('permission:role-create', ['only' => ['create','store']]);
         $this->middleware('permission:role-edit', ['only' => ['edit','update']]);

         $this->middleware('permission:role-delete', ['only' => ['destroy']]); 

I am not using Permissions, I am just using the roles because I don't know how to attach many permissions to the roles. Maybe we are required to make a crud for that. By the way kindly tell if there is any way to do it using the roles only.. Thanks in advance. I am newbie


Sign in to participate in this thread!


Your banner here too?


We'd like to thank these amazing companies for supporting us

Your logo here?

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 - All rights reserved.