/**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     DB::statement('SET FOREIGN_KEY_CHECKS = 0');
     //To delete the table data before creating new ones
     \App\Entities\ProjectNote::truncate();
     \App\Entities\Project::truncate();
     \App\Entities\Client::truncate();
     \App\Entities\User::truncate();
     factory(\App\Entities\User::class, 10)->create();
     factory(\App\Entities\User::class)->create(['name' => 'Eduardo Junior', 'email' => '*****@*****.**', 'password' => bcrypt('test'), 'remember_token' => str_random(10)]);
     factory(\App\Entities\Client::class, 10)->create();
     factory(\App\Entities\Project::class, 10)->create();
     factory(\App\Entities\ProjectNote::class, 50)->create();
     DB::statement('SET FOREIGN_KEY_CHECKS = 1');
 }
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     Model::unguard();
     DB::statement('SET FOREIGN_KEY_CHECKS=0;');
     User::truncate();
     Post::truncate();
     Comment::truncate();
     Tag::truncate();
     DB::statement('SET FOREIGN_KEY_CHECKS=1;');
     $this->call(UserTableSeeder::class);
     $this->call(PostTableSeeder::class);
     $this->call(CommentTableSeeder::class);
     $this->call(TagTableSeeder::class);
     Model::reguard();
 }
示例#3
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     DB::statement('SET FOREIGN_KEY_CHECKS = 0');
     // disable foreign key constraints
     User::truncate();
     Profile::truncate();
     Brand::truncate();
     Model::unguard();
     $this->call('UsersTableSeeder');
     $this->call('ProfilesTableSeeder');
     $this->call('BrandsTableSeeder');
     $this->call('BrandUserTableSeeder');
     $this->call('QuotesTableSeeder');
     $this->call('FeedsTableSeeder');
     Model::reguard();
     DB::statement('SET FOREIGN_KEY_CHECKS = 1');
     // enable foreign key constraints
 }
示例#4
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     DB::statement('SET FOREIGN_KEY_CHECKS = 0');
     // disable foreign key constraints
     User::truncate();
     Profile::truncate();
     Language::truncate();
     Expertise::truncate();
     Meetup::truncate();
     Photo::truncate();
     Model::unguard();
     $this->call('UsersTableSeeder');
     $this->call('ProfilesTableSeeder');
     $this->call('LanguagesTableSeeder');
     $this->call('ExpertisesTableSeeder');
     $this->call('MeetupsTableSeeder');
     $this->call('PhotosTableSeeder');
     Model::reguard();
     DB::statement('SET FOREIGN_KEY_CHECKS = 1');
     // enable foreign key constraints
 }
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     \App\Entities\User::truncate();
     factory(\App\Entities\User::class)->create(['name' => 'Alexandre Mota Monteiro', 'email' => '*****@*****.**', 'password' => bcrypt(123456), 'remember_token' => str_random(10)]);
     factory(\App\Entities\User::class, 9)->create();
 }