示例#1
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     Model::unguard();
     DB::statement('SET FOREIGN_KEY_CHECKS=0;');
     CodeProject\Entities\ProjectTask::truncate();
     CodeProject\Entities\ProjectNote::truncate();
     CodeProject\Entities\Project::truncate();
     CodeProject\Entities\Client::truncate();
     CodeProject\Entities\User::truncate();
     DB::statement('SET FOREIGN_KEY_CHECKS=1;');
     $this->call(ClientTableSeeder::class);
     $this->call(UserTableSeeder::class);
     $this->call(ProjectTableSeeder::class);
     $this->call(ProjectNoteTableSeeder::class);
     $this->call(ProjectTaskTableSeeder::class);
     DB::table('oauth_clients')->insert(['id' => 'appid1', 'secret' => 'secret', 'name' => 'AngularAPP']);
     Model::reguard();
 }
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     CodeProject\Entities\Project::truncate();
     factory(\CodeProject\Entities\Project::class, 10)->create();
     //
 }