laravel create migration from existing table code example

Example 1: create laravel migration

php artisan make:migration create_users_table

Example 2: create database from migration laravel for all

php artisan migrate:refresh

php artisan migrate:refresh --seed

Example 3: how to change existing migration laravel

php artisan make:migration update_user_guide_in_product_translations_table

Example 4: migrate to an existing table in laravel commad

public function up()
{
    Schema::table('users', function($table) {
        $table->integer('paid');
    });
}

Tags:

Php Example