Allow generation of other types of classes when model is already present using make:model #49116
Unanswered
NiekNijland
asked this question in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I was planning on submitting a PR, but first, I would like to get some input on my proposed change.
What I would like to do is to allow generating classes (factories, seeders, etc.) using options on the
make:model
command, even if the model is already present. So, if you have already created a Model, there is still a shorthand command available to generate all the related framework classes.I know it is possible to use the --force option, but that will overwrite the Model too, so any made changes are then overwritten.
An example of an implementation like I'm proposing is already found in Livewire, where
livewire:make Component --test
will generate a test class without touching a previously created Component.Here, it does show a warning/error that the component was already created, which is something I would like to see too.
Please let me know what the consensus is on this; then, I'll be glad to contribute.
Beta Was this translation helpful? Give feedback.
All reactions