Skip to content
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

Add Builder On Clone callback support #54477

Open
wants to merge 5 commits into
base: 11.x
Choose a base branch
from

Conversation

ralphjsmit
Copy link
Contributor

I noticed that when the Eloquent Builder is cloned, it will not clone the internal Eloquent model. This can be problematic for a package like kirschbaum-development/eloquent-power-joins, which depends with a cache on the spl_object_id() of the Eloquent model in the query.

This PRs adds a simple onClone() callback that will be called anytime a Builder is cloned, leaving open more advanced options for these more advanced Eloquent packages.

Thanks!

@ralphjsmit ralphjsmit changed the title Add Builder On Clone callbacks Add Builder On Clone callback support Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant