This is what I use at the moment to create Controller and Model
php artisan make:controller API/name_of_controller --api --model=name_of_model
then create a migration
php artisan make:migration create_users_table
In the past before I started using API, I used to do this to create model, migration and controller in one single line
php artisan make:model Banana -mcr
Is there a way to do this with API controller?
I think there is no existing command to do that. How you create them currently is the best solution
php artisan make:controller API/TestController --api --model=Test
# then
php artisan make:migration create_tests_table
Why?
php artisan help make:controller
php artisan help make:model
--controller=API/TestController
when using
make:model
command