You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 10, 2023. It is now read-only.
Should this be something that we register as part of the route?
If one action/controller then we could also do something like beforeGet, beforePost, etc (IIRC @WanWizard mentioned something like HTTP-method methods)
That was indeed the direction I was thinking. If you only have one single action, you have a lot more flexibility in the controller, without making it too complex.
To be honest, I generally agree with the one action/controller idea, but there are cases when I would like to put multiple actions in a controller (eg. a few related static pages) and I don't want such limitation (as a user).
If we have multiple base controller classes, and we deal with the actual calling of methods inside the __invoke() of those classes, it should be possible to have both, so the user can choose.
The only thing we have to look at when we get there, is the route-to-controller mapping, because based on the type of system in use, you need to load a different file. But I'd say we tackle that when we get there...
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Allow a method to run logic before an action is run, with the ability to skip the action if needed. (I remember this being requested lots in v1)
The text was updated successfully, but these errors were encountered: