Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged
mikebronner merged 2 commits into mikebronner:master from d8vjork:master
Jul 30, 2022

Conversation

Copy link
Contributor

@d8vjork d8vjork commented Jul 20, 2022

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

Copy link

@d8vjork Thanks for your PR. Waiting for merge so we can use laravel-model-caching again

d8vjork reacted with thumbs up emoji

Copy link
Owner

@d8vjork thanks for your work on this. Please send me an update as soon as your PR is finished. Thanks! :)

Copy link
Contributor Author

d8vjork commented Jul 20, 2022
edited
Loading

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

Copy link
Contributor Author

d8vjork commented Jul 20, 2022

@mikebronner Ok test added and passing, ready to merge

Bjornftw and LemmoTresto reacted with rocket emoji

Copy link

@mikebronner any updates?

d8vjork and LemmoTresto reacted with eyes emoji

Copy link
Owner

@Bjornftw @d8vjork Thanks for the updates. I will take a look this weekend. :) I appreciate all you contributions! This really helps.

d8vjork and Bjornftw reacted with thumbs up emoji

@mikebronner mikebronner self-requested a review July 28, 2022 13:03
@mikebronner mikebronner merged commit 44f37aa into mikebronner:master Jul 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@mikebronner mikebronner Awaiting requested review from mikebronner

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /