Laravel. Authorization how to register the rights (Gate)?
Hi all. Question about authorization
I have a public part (the Internet store) and an administrative part.
And complex logic with permissions before conducting the registration of rights (Gate::...) I need to understand what part of the application the user is.
Or it is administrative, then one logic, if in the online display - different logic.
The question is, how should I do that?
The first thing that came to mind, can the middleware handle, tie all administrative routerы in middleware (app example:admin)
and inside already to register the right Gate. For Internet Windows app:shop.
But how much it is right in the middleware to register access rights?
What else has the ability to implement it?