down() public method

Reverse the migrations.
public down ( ) : void
return void
Ejemplo n.º 1
0
 /**
  * Reverse the migrations
  */
 public function down()
 {
     $this->createShipsTable->down();
     $this->createTypesTable->down();
     $this->createUsersTable->down();
     $this->createCompaniesTable->down();
     echo "Database tables destroyed.\n\n";
 }
Ejemplo n.º 2
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     // DB::table('users')->delete(); // only deletes all records from table. that's a problem because the auto incrementing id will not reset to 1.
     // Calling appropriate migration directly
     $ut = new CreateUsersTable();
     $ut->down();
     $ut->up();
     User::create(array('fname' => 'Riddhi', 'lname' => 'Mittal', 'mobile' => 9873574130, 'password' => Hash::make('9873574130'), 'age' => 34, 'email' => '*****@*****.**'));
 }