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.7] Allow adding additional $manyMethods when extending the model class #26307

Merged
merged 1 commit into from
Oct 30, 2018
Merged

[5.7] Allow adding additional $manyMethods when extending the model class #26307

merged 1 commit into from
Oct 30, 2018

Commits on Oct 30, 2018

  1. Access the $manyMethods property through static::$manyMethods

    This allows adding additional $manyMethods when extending the model class
    and still receive a correct guess for the relationship name.
    
    Removed the name of guessBelongsToManyRelation from the list but still consider
    it when analyzing the call stack. This makes $manyMethods more slim and easier
    to override.
    
    Removed findFirstMethodThatIsntRelation from $hasMany array, since it does not
    appear anywhere in the code and seems to have been forgotten there.
    It is also not really a name for a many-relationship method, so if it is needed,
    i think there might be a better place for it.
    spawnia committed Oct 30, 2018
    Configuration menu
    Copy the full SHA
    7cef687 View commit details
    Browse the repository at this point in the history