mikebronner / laravel-pivot-events

MIT License
119 stars 8 forks source link

add syncing and synced events #6

Closed AbdelAbouhassane closed 2 years ago

AbdelAbouhassane commented 2 years ago

Context

The Sync method uses behind the scenes first detach to detach all associations and then will use attachNew for each new entry, which leads to a lot of events being dispatched.

What did I do

PS

Don't be intimidated by the number of changes, Don't know why but git thinks I removed all the lines whereas I only made some changes and added some lines 😕

AbdelAbouhassane commented 2 years ago

Thank you so much for attempting this PR! It is greatly appreciated. Please consider making some changes according to the feedback — if not I can take a look at it next week(end?) and will probably only implement the addition of sync events.

@mikebronner It's a pleasure, the package was very helpful 👍 I've made the necessary changes as you requested

AbdelAbouhassane commented 2 years ago

@mikebronner can you please check this PR again and if its okay merge it ASAP Thanks

mikebronner commented 2 years ago

@AbdelPlayPlay Thanks for reminding me, sorry for the delay.