Skip to content

Conversation

@squatto
Copy link
Contributor

@squatto squatto commented Aug 28, 2020

Laravel looks for a method named boot<TraitName> so that traits can boot while still allowing the model itself to have a boot() method. More info can be found here.

This PR simply changes the boot() method name to bootDefaultOrderBy() so that it doesn't collide with existing model boot() methods. It also prevents an error when $orderByColumn isn't defined (it just returns, doing nothing)

I put the releases in the changelog too ;)

Thanks!

@stephenjude stephenjude merged commit c574a9f into stephenjude:master Sep 16, 2020
@stephenjude
Copy link
Owner

Thanks for this PR

@squatto squatto deleted the fix-model-booting branch September 16, 2020 15:07
@squatto
Copy link
Contributor Author

squatto commented Sep 16, 2020

My pleasure!

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.

2 participants