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] Allow getActualClassNameForMorph() used by createModelByType() to be overridden #18099

Closed
wants to merge 1 commit into from

Conversation

masterwto
Copy link
Contributor

Refer to #18058.

…overridden

Allow getActualClassNameForMorph() used by createModelByType() to be overridden. Refer to #18058.
@themsaid themsaid changed the title Allow getActualClassNameForMorph() used by createModelByType() to be overridden [5.4] Allow getActualClassNameForMorph() used by createModelByType() to be overridden Feb 24, 2017
@themsaid
Copy link
Member

@masterwto Travis fails.

@taylorotwell
Copy link
Member

Closing pending inactivity.

Yi-pixel added a commit to Yi-pixel/laravel-framework that referenced this pull request Nov 30, 2024
… to be override

This is an addition to laravel#18058 and laravel#18099 from a long time ago.

Use $this->parent to replace Model, which will give users the opportunity to override the default getActualClassNameForMorph behavior in the Model within their own models.

The parent here inherits from the ancestor Relation, and it will be populated when the MorphTo is initialized

Refer to laravel#18058 laravel#18099
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.

3 participants