spatie / activitylog

A very simple activity logger to monitor the users of your website or application
https://spatie.be/opensource/laravel
MIT License
582 stars 75 forks source link

To fire event on a relationship many-to-many #20

Closed judantus closed 8 years ago

judantus commented 8 years ago

Anyone found a good way to fire an event on a many to many relationship attach/detach/sync?

freekmurze commented 8 years ago

Eloquent doesn't fire events for those. You could try opening an issue on the Laravel repo.

On Stack Overflow there seem to be a few solutions as well: http://stackoverflow.com/questions/28925292/eloquent-attach-detach-sync-fires-any-event