Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

dwidman's avatar

Trigger an event after saving/updating/deleting an object (Laravel 5.3)

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

0 likes
2 replies
dwidman's avatar

Thanks Nico.

I just browsed at the docs and it is what I need, but it is kinda complicated.

I wish there was a video class or step by step tutorial on this. The one we have here is a little outdated.

David

Please or to participate in this conversation.