create table in database using migration code example
Example 1: create migration table in php
php artisan make:migration create_users_table
Example 2: how database migration work
class ChangeProductsPrice < ActiveRecord::Migration[5.0]
def change
reversible do |dir|
change_table :products do |t|
dir.up { t.change :price, :string }
dir.down { t.change :price, :integer }
end
end
end
end