-
Notifications
You must be signed in to change notification settings - Fork 232
Add pivotSynced event listener to flush cache when performing BelongsToMany::sync #433
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Bjornftw
commented
Jul 20, 2022
@d8vjork Thanks for your PR. Waiting for merge so we can use laravel-model-caching again
@d8vjork thanks for your work on this. Please send me an update as soon as your PR is finished. Thanks! :)
Ok I've no idea how tests works, even disabling most of these event listeners tests passes 🤔
Will try to replicate the same test as attach/detach in BelongsToMany then
@mikebronner Ok test added and passing, ready to merge
Bjornftw
commented
Jul 25, 2022
@mikebronner any updates?
As title describes, we've multiple issues on our Laravel 9 based project when users saving stuff on our API.
Apparently this "stuff" has all to do with using sync (in multiple cases required for our business logic to work with the feature design).
So that's how I've found that the
pivotSynced
event was already available in laravel-pivot-events but not mentioned here.I'll later today send some commits verifying / testing this scenario I had