Hey
Take a look at the Events section of the Laravel docs. That'll do the job!
Feel free to ask if you have any questions regarding this :)
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hello friends at Laracasts,
I have a project where I store several items with properties that need to be calculated with filters. After I insert/update/delete/etc any item or filter, I need to re-run the filters on all the modified items or run an updated/created filter over all the items.
Actually, I am doing this as a call right after any create/update/delete/etc of the item and of the filters, but I believe that it can be done as an listener/event to become more elegant.
I was browsing thru the videos and the example that we have here is for an older version of laravel.
Does anyone have an example or better suggestion on how to improve this?
Thanks, David
Please or to participate in this conversation.