Inheritance: extends ChingShop\Database\Migration
Example #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";
 }
 function tablolariOlustur()
 {
     $tabloolustur = new \CreateUsersTable();
     $tabloolustur->up();
     $resettablo = new \CreatePasswordResetsTable();
     $resettablo->up();
     return \Redirect::to('auth/register');
 }
Example #3
0
 /**
  * Run the migrations
  *
  * @return void
  */
 function run()
 {
     $usersTable = new CreateUsersTable();
     $notesTable = new CreateNotesTable();
     $notesTable->drop();
     $usersTable->drop();
     $usersTable->create();
     $notesTable->create();
 }
 /**
  * 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' => '*****@*****.**'));
 }