Tables: Creating Tables

Schema::create('users', function (Blueprint $table) {
    $table->increments('id');
});

Of course, when creating the table, you may use any of the schema builder's column methods to define the table's columns.

Checking For Table / Column Existence

If (Schema::hasTable('users')) {
    //
}

if (Schema::hasColumn('users', 'email')) {
    //
}

Database Connection & Table Options

Schema::connection('foo')->create('users', function (Blueprint $table) {
    $table->increments('id');
});

Tables: Creating Tables — Structure map

Clickable & Draggable!

Tables: Creating Tables — Related pages: