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

[8.x] Add table name as default morph type #35257

Merged
merged 1 commit into from Nov 18, 2020

Conversation

imanghafoori1
Copy link
Contributor

@imanghafoori1 imanghafoori1 commented Nov 17, 2020

Currently, the default value for morph type is the "namespaced classpath" of the model and the user should define an alias for each new model.
The PR lets the user change the default morph values to the table names with a single method call which is good enough since the table names often do not change and are unique.

  • Older projects can continue working unharmed as they were before. This is meant to be used for from-scratch projects.

  • For laravel 9.x it is possible to make the table name as default values and enable the legacy mode with a method call, for upgrading projects.

@taylorotwell
Copy link
Member

@imanghafoori1 See above. This PR is broken.

@driesvints
Copy link
Member

We'll need to revert this as it seems impossible to ever ship this with a working implementation. See my comment here: #35519 (comment)

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.

None yet

3 participants