-
Notifications
You must be signed in to change notification settings - Fork 11.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use parent connection if no model connection specified (#16103)
- Loading branch information
1 parent
5811bc3
commit bb15574
Showing
2 changed files
with
129 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bb15574
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok great, for now we are going to paste this code to see if it works.
One note:
The on() method returns a Eloquent Builder instance, thus you should convert it back to the Model instance using getModel(). Does the model instance retrieved by getModel() also use this fix?
Edit:: getModel() on a Builder instance seems to work like a charm