Level 88
Hi,
You create a migration and a model at once by running
php artisan make:model -m Product
// Will output
Model created successfully.
Created Migration: 2017_11_25_083612_create_products_table
You can also create your controller at once, for more options you need to run:
php artisan make:model -h
// Output
Usage:
make:model [options] [--] <name>
Arguments:
name The name of the class
Options:
-m, --migration Create a new migration file for the model.
-c, --controller Create a new controller for the model.
-r, --resource Indicates if the generated controller should be a resource controller
2 likes