Haluk
0
Q:

php artisan make migration

Schema::table('posts', function (Blueprint $table) {
    $table->unsignedInteger('user_id');

    $table->foreign('user_id')->references('id')->on('users');
});
6
php artisan make:Model Status -m
1
Try this command it works for me

php artisan migrate:fresh
However, be careful! This command will drop all data from your DB:
0
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
php artisan migrate:refresh

php artisan migrate:refresh --seed
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 create_users_table
2
php artisan make:model Model_Name -m
0

New to Communities?

Join the community