CreateUsersTable::up PHP Method

up() public method

Run the migrations.
public up ( ) : void
return void
    public function up()
    {
        Schema::create('users', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name');
            $table->string('email')->unique();
            $table->string('password', 60);
            $table->boolean('is_admin')->default(false);
            $table->rememberToken();
            $table->timestamps();
        });
    }

Usage Example

Esempio n. 1
0
 /**
  * Run the migrations
  */
 public function up()
 {
     $this->createShipsTable->up();
     $this->createTypesTable->up();
     $this->createCompaniesTable->up();
     $this->createUsersTable->up();
     $this->addTypeToVesselTable->up();
     $this->addCompanyToVesselTable->up();
     $this->addUserToCompanyTable->up();
     echo "Migration process completed.\n\n";
 }
All Usage Examples Of CreateUsersTable::up
CreateUsersTable