laravel create migration table code example

Example 1: php artisan make migration

php artisan make:migration create_users_table

Example 2: add column in laravel migration

php artisan make:migration add_paid_to_users_table --table=users

Example 3: create laravel migration

php artisan make:migration create_users_table

Example 4: how to make-migrations in laravel

php artisan make:migration create_users_table --create=users

php artisan make:migration add_votes_to_users_table --table=users

Example 5: laravel make migration

php artisan make:migration CreateUsersTable

Example 6: migrate to an existing table in laravel commad

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

Tags:

Misc Example