Because this is one area where a project often becomes almost unmanageable, I want to simplify the overview of permissions and therefor middleware in my Laravel project by storing them in the database.
My thought is to store every route in the database and there assign middleware to them. I can already use middleware like role:admin or permission:can-create so it's simply middlewares.
However this would require every request to look up in the database in order to check for middleware, which makes me worried that it would hit the performance hard and slow down things a lot.
With the middleware solution in hand now, I already have the option to generate a good overview, but I would also like the option to manage and modify the permissions from a nice interface.
What is your recommendation for doing it database wise or other solutions?
No responses yet.