-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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
[11.x] Feat: factory generic in make:model command #52855
[11.x] Feat: factory generic in make:model command #52855
Conversation
Just as an idea: Could you not also replace the (Change in behaviour, but acceptable in my opinion) |
@Jubeki But yeah it's a change in behaviour! I would like to see @taylorotwell's thoughts on the same. |
@MrPunyapal, something seems off here... The I appreciate some of this may predate this PR. But seems one of these paths may be buggy. |
@jasonmccreary |
Based on this comment by @taylorotwell, I have adjusted the
make:model
command to include a factory doc-block.For example, if I run the following command:
php artisan make:model Post
I will get a file with the code below, as it was before:
However, if I run the following command:
php artisan make:model Comment -f
or any other command that generates a factory along with it, the resulting file will contain the code below: