akbar
18
Q:

laravel make migration

php artisan make:migration create_users_table
2
//to create migration file in PHP use the artisan command "make"
php artisan make:migration create_users_table
// migration file must follow the naming convention "operation_tableName_table"
//Migration file to add column naming convention would be "add_tablename_table"
1
php artisan make:migration create_users_table --create=users

php artisan make:migration add_votes_to_users_table --table=users
3
php artisan migrate
0
php artisan make:migration add_votes_to_users_table --table=users

php artisan make:migration create_users_table --create=users
1
# If you would like to generate a database migration when you 
# generate the model, you may use the --migration or -m option:

php artisan make:model Flight --migration
php artisan make:model Flight -m
2
php artisan make:migration CreateUsersTable
1
Use this package
https://github.com/oscarafdev/migrations-generator
composer require oscarafdev/migrations-generator --dev
Run php artisan migrate:generate to create migrations for all the tables, 
or you can specify the tables you wish to generate using 
php artisan migrate:generate table1,table2,table3,table4,table5. 
You can also ignore tables with --ignore="table3,table4,table5"

You can check this out(Never tested this before)
https://github.com/Xethron/migrations-generator
composer require --dev "xethron/migrations-generator"
0
php artisan make:Model Product -m -c  --resource
0

New to Communities?

Join the community