Model callbacks #47
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Add callbacks to model methods.
Possibly create event dispatcher to handle callbacks on Models and in other places (view before/after render?)
Got any use cases for this? One thought is massaging the data as an after find... not really following the before logic.
This /may/ be something that could be offloaded to the resource class as there is now a way (well soon, working through it now) to filter fields that are incoming
Maybe so you could check query parameters and modify them? So, if you always want to add a 'user_id' into a query if it's not there, do it in the beforeFind instead of every time you want to retrieve data. Or to prevent a query from running if it doesn't have the correct parameters?