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

[6.x] Add an --api option to the make:model command to generate an API Controller #31197

Merged
merged 1 commit into from
Jan 23, 2020

Conversation

deligoez
Copy link
Contributor

With this PR we can generate an API controller for a model while creating the model using the command:

php artisan make:model Order --api

Or we can generate a factory, seeder, migration, resource, and API controller all in the same command:

php artisan make:model Order --all --api

Generating resourceful controller works too:

php artisan make:model Order --resource --api

Breaking Changes

There should be no breaking change since the make:model command already using make:controller command in the background.

@GrahamCampbell GrahamCampbell changed the title Add an --api option to the make:model command to generate an API Controller [6.x] Add an --api option to the make:model command to generate an API Controller Jan 22, 2020
@taylorotwell taylorotwell merged commit 5224d72 into laravel:6.x Jan 23, 2020
crynobone added a commit to orchestral/canvas that referenced this pull request Jan 24, 2020
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