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] add force option to some generators #19932

Merged
merged 2 commits into from
Jul 6, 2017
Merged

[5.4] add force option to some generators #19932

merged 2 commits into from
Jul 6, 2017

Conversation

browner12
Copy link
Contributor

this will allow the user to continue execution of the command even if the class already exists.

Example:

User types php artisan make:model Blog but forgets to add the -mcr flags to make their migration and resource controller. Currently they would either have to write the migration and controller command themselves

php artisan make:migration create_blogs_table --table=blogs
php artisan make:contoller BlogController --model=/App/Blog

or they could delete the Blog model and run the command again with the flags.

php artisan make:model Blog -mcr

What this change allows us to do is run the flag commands immediately after the original command.

php artisan make:model Blog -mcrf

This will still realize the model already exists and not try to create it again, but it will not return false and halt execution of the flagged commands.

browner12 added 2 commits July 6, 2017 15:23
this will allow the user to continue execution of the command even if the class already exists.
@taylorotwell taylorotwell merged commit aba84b7 into laravel:5.4 Jul 6, 2017
@browner12 browner12 changed the title add force option to some generators [5.4] add force option to some generators Jul 6, 2017
@browner12 browner12 deleted the command-override branch July 6, 2017 22:10
@vicgonvt
Copy link
Contributor

👍

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