Assign permissions to Routes in UI

96 views Asked by At

I have implemented the spatie laravel permissions module in my application and it is working perfectly. Currently I have all my routes protected with permissions using the Middleware of the module, but I have to define the permissions in the web.php file. Is there a way to assign these permissions to the routes by storing them in the DB? I have thought about doing it by creating a controller that assigns the permissions and then checking them with a middleware, but is there any other more optimal way to do it? Thanks in advance

0

There are 0 answers