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

[5.4] Move model methods to builder #17395

Merged
merged 2 commits into from
Jan 18, 2017
Merged

[5.4] Move model methods to builder #17395

merged 2 commits into from
Jan 18, 2017

Conversation

themsaid
Copy link
Member

This PR moves the create and forceCreate methods to the Builder, this will allow stuff like:

User::on('myCustomConnection')->create();

@dotuancd
Copy link

After create new instance, the Model continue call the create() method and create() method is don't exists in Model class. So, it will call to another magic method is __call() and in this method will make query builder instance and call to create() method.

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.

5 participants