Skip to content

[9.x] Make:model --morph flag to generate MorphPivot model - #41011

Merged
taylorotwell merged 4 commits into
laravel:9.xfrom
michael-rubel:feature/make-morph-model-command
Feb 14, 2022
Merged

taylorotwell merged 4 commits into
laravel:9.xfrom
michael-rubel:feature/make-morph-model-command

Conversation

@michael-rubel

Copy link
Copy Markdown
Contributor
  • This PR adds the possibility to generate MorphPivot model using make:model command in Laravel 9.

Why?

Had to create a lot of models for polymorphic tables, and I always miss the option to include the MorphPivot instead of the basic one on make:model immediately, so I think it will be helpful for those who work with polymorphic tables on a daily basis.

@taylorotwell

Copy link
Copy Markdown
Member

Rename option to morph-pivot.

@taylorotwell
taylorotwell merged commit d3ee810 into laravel:9.x Feb 14, 2022
salmanarshad321 pushed a commit to salmanarshad321/framework that referenced this pull request Sep 23, 2026
…1011)

* add stub

* update model command to handle morph pivot

* formatting

* add files

Co-authored-by: Taylor Otwell <taylor@laravel.com>
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