/**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     $owners = [['email' => '*****@*****.**', 'password' => bcrypt('admin')]];
     User::truncate();
     foreach ($owners as $owner) {
         $user = User::create($owner);
         $user->roles()->attach(Role::where('name', 'owner')->firstOrFail());
         $user->save();
     }
 }
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     User::truncate();
     DB::table('payee_payer')->truncate();
     $jenny = User::create(['name' => 'Jenny', 'email' => '*****@*****.**', 'password' => bcrypt('abcdefg')]);
     $jane = User::create(['name' => 'Jane', 'email' => '*****@*****.**', 'password' => bcrypt('abcdefg')]);
     $bob = User::create(['name' => 'Bob', 'email' => '*****@*****.**', 'password' => bcrypt('abcdefg')]);
     $john = User::create(['name' => 'John', 'email' => '*****@*****.**', 'password' => bcrypt('abcdefg')]);
     /**
      * Create payers for John
      */
     $payee_john = Payee::find($john->id);
     $payee_john->payers()->attach($jenny->id);
     $payee_john->payers()->attach($jane->id);
     $payee_john->payers()->attach($bob->id);
     $payee_john->save();
     /**
      * Create payers for Bob
      */
     $payee_bob = Payee::find($bob->id);
     $payee_bob->payers()->attach($jenny->id);
     $payee_bob->payers()->attach($john->id);
     $payee_bob->save();
     /**
      * Create payers for Jenny
      */
     $payee_bob = Payee::find($bob->id);
     $payee_bob->payers()->attach($john->id);
     $payee_bob->save();
 }
Example #3
0
    public function run()
    {	
      User::truncate();
			User::create(['name' => 'Deepak',
        			'email' => '*****@*****.**',
       				'password' => 'deepak',
       				'role_id' => '1']);
			User::create(['name' => 'Monsoor',
        			'email' => '*****@*****.**',
       				'password' => 'monsoorch',
       				'role_id' => '2']);
			User::create(['name' => 'Suraj',
        			'email' => '*****@*****.**',
       				'password' => 'sactrack',
       				'role_id' => '3']);
			User::create(['name' => 'Saidul',
        			'email' => '*****@*****.**',
       				'password' => '123456',
       				'role_id' => '4']);
			User::create(['name' => 'Raihan',
        			'email' => '*****@*****.**',
       				'password' => '321654',
       				'role_id' => '5']);

	}
Example #4
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     // clear table
     User::truncate();
     // add 1st row
     User::create(['name' => 'Anna', 'email' => '*****@*****.**', 'password' => '$2y$10$qQdDaXWbo4itF/B12I7KgOIkLBgMuA9O3xup1VoN1vwv69YF2P1Ga']);
 }
Example #5
0
 /**
  * Run the database seeds.
  *
  * @return  void
  */
 public function run()
 {
     Tag::truncate();
     User::truncate();
     Bookmark::truncate();
     DB::table('bookmark_tag')->truncate();
     // Start with 10 users, then iterate through each one to populate the other tables
     $users = factory(App\User::class, 50)->create();
     $users->each(function ($user) {
         // Create a variable number of bookmarks/tags and persist them to the DB.
         // saveMany() automatically associates them with the current user_id.
         $bookmarks = factory(App\Bookmark::class, rand(2, 5))->make();
         $user->bookmarks()->saveMany($bookmarks);
         $tags = factory(App\Tag::class, rand(2, 5))->make();
         $user->tags()->saveMany($tags);
         // Everything is populated now except the bookmark_tag pivot table.
         // For that we need another loop.
         $tags->each(function ($tag) use($bookmarks) {
             for ($i = 0; $i < rand(1, 3); $i++) {
                 // Select a random bookmark from the $bookmarks collection,
                 // then attach the tag only IF the tag has not already been attached
                 // to that bookmark.
                 $bookmark = $bookmarks[rand(0, $bookmarks->count() - 1)];
                 if (!$bookmark->tags()->where('tag_id', $tag->id)->exists()) {
                     $bookmark->tags()->attach($tag);
                 }
             }
         });
     });
 }
Example #6
0
 public function run()
 {
     // clear table
     User::truncate();
     // add 1st user
     User::create(['name' => 'Hilmy Syarif', 'email' => '*****@*****.**', 'password' => bcrypt('benjo99')]);
 }
Example #7
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     //Truncate
     DB::statement('SET FOREIGN_KEY_CHECKS=0;');
     User::truncate();
     Admin::truncate();
     Customer::truncate();
     Address::truncate();
     Category::truncate();
     Product::truncate();
     Brand::truncate();
     Type::truncate();
     Image::truncate();
     DB::statement('TRUNCATE category_product;');
     Product::clearIndices();
     Product::reindex();
     //Unguard
     Model::unguard();
     //Call
     $this->call(UsersTableSeeder::class);
     $this->call(ProductsTableSeeder::class);
     //Reguard
     Model::reguard();
     DB::statement('SET FOREIGN_KEY_CHECKS=1;');
 }
Example #8
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     $this->call('FabricanteSeeder');
     $this->call('VehiculoSeeder');
     User::truncate();
     $this->call('UserSeeder');
 }
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     Model::unguard();
     User::truncate();
     factory(User::class, 50)->create();
     Model::reguard();
 }
Example #10
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     Aluno::truncate();
     User::truncate();
     Model::unguard();
     $this->call('UserTableSeeder');
     $this->call('AlunoTableSeeder');
 }
Example #11
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     Model::unguard();
     // $this->call(UserTableSeeder::class);
     User::truncate();
     factory(App\User::class, 50)->create();
     Model::reguard();
 }
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     \App\User::truncate();
     //Usuario de teste
     factory('App\\User')->create(['name' => 'Beto', 'email' => '*****@*****.**', 'password' => bcrypt(123), 'remember_token' => str_random(10)]);
     factory(User::class, 5)->create();
     // o codigo User::class e o mesmo que 'App\User', recurso do php 5
 }
Example #13
0
 /**
  * заполнение пользователей
  */
 private function userTable()
 {
     User::truncate();
     $data = [['name' => 'user1', 'password' => \Hash::make('user1'), 'email' => '*****@*****.**', 'group_id' => 2], ['name' => 'user2', 'password' => \Hash::make('user2'), 'email' => '*****@*****.**', 'group_id' => 2], ['name' => 'admin', 'password' => \Hash::make('admin'), 'email' => '*****@*****.**', 'group_id' => 1]];
     foreach ($data as $v) {
         User::create($v);
     }
 }
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     //
     User::truncate();
     User::create(['rol_id' => 1, 'nombre' => 'Administrador', 'email' => 'Admin', 'password' => Hash::make('123456')]);
     User::create(['rol_id' => 2, 'nombre' => 'rrhh', 'email' => 'RRHH', 'password' => Hash::make('123456')]);
     User::create(['rol_id' => 3, 'nombre' => 'trabajador1', 'email' => 'Trabajador1', 'password' => Hash::make('123456')]);
 }
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     DB::statement("SET foreign_key_checks = 0");
     User::truncate();
     DB::statement("SET foreign_key_checks = 1");
     User::create(['user_name' => 'frodo', 'user_email' => '*****@*****.**', 'password' => bcrypt('112233')]);
     User::create(['user_name' => 'bilbo', 'user_email' => '*****@*****.**', 'password' => bcrypt('112233'), 'is_user_ngo' => 1]);
 }
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     //delete
     User::truncate();
     //Insert
     User::insert([['name' => 'admin', 'email' => '*****@*****.**', 'password' => Hash::make('admin'), 'role' => 'admin', 'confirmed_at' => Carbon::now()]]);
     //Insert
     User::insert([['name' => 'user', 'email' => '*****@*****.**', 'password' => Hash::make('user'), 'role' => 'user', 'confirmed_at' => Carbon::now()]]);
 }
Example #17
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     // clear table
     \App\User::truncate();
     // add 1st row
     \App\User::create(['email' => '*****@*****.**', 'password' => Hash::make('asdf'), 'access_id' => 1]);
     // add 2nd row
     \App\User::create(['email' => '*****@*****.**', 'password' => Hash::make('asdf'), 'access_id' => 2]);
 }
Example #18
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     Model::unguard();
     \App\User::truncate();
     \App\Bookmark::truncate();
     $this->call(BookmarkTableSeeder::class);
     $this->call(UserTableSeeder::class);
     Model::reguard();
 }
Example #19
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     User::truncate();
     $faker = Faker::create();
     User::create(['email' => '*****@*****.**', 'password' => \Illuminate\Support\Facades\Hash::make('raresetare'), 'name' => 'rareshutanu']);
     User::create(['email' => '*****@*****.**', 'password' => \Illuminate\Support\Facades\Hash::make('test'), 'name' => 'test']);
     foreach (range(1, 3) as $index) {
         User::create(['email' => $faker->email, 'password' => \Illuminate\Support\Facades\Hash::make($faker->password(6, 7)), 'name' => $faker->userName]);
     }
 }
Example #20
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     $faker = \Faker\Factory::create();
     User::truncate();
     //        DB::table('users')->insert([
     User::insert([['name' => 'Kenn E. Thompson', 'email' => '*****@*****.**', 'password' => bcrypt('abc123'), 'created_at' => new DateTime(), 'updated_at' => new DateTime()]]);
     foreach (range(1, 99) as $index) {
         User::insert(['name' => $faker->name, 'email' => $faker->email, 'password' => bcrypt('secret'), 'created_at' => dateTime($max = 'now'), 'updated_at' => dateTime($max = 'now')]);
     }
 }
Example #21
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     DB::statement('SET FOREIGN_KEY_CHECKS = 0');
     $this->call('FabricanteSeeder');
     $this->call('VehiculoSeeder');
     User::truncate();
     DB::table('oauth_clients')->truncate();
     $this->call('UserSeeder');
     $this->call('Oauth2Seeder');
 }
Example #22
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     Model::unguard();
     $this->call('FabricanteSeeder');
     $this->call('AvionSeeder');
     User::truncate();
     // LLamamos al seeder de Users.
     $this->call('UserSeeder');
     Model::reguard();
 }
Example #23
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     DB::statement('SET FOREIGN_KEY_CHECKS = 0');
     Maker::truncate();
     User::truncate();
     Model::unguard();
     $this->call('MakerSeed');
     $this->call('VehiclesSeed');
     $this->call('UsersSeed');
 }
Example #24
0
 public function run()
 {
     User::truncate();
     User::create(['email' => '*****@*****.**', 'password' => Hash::make('password'), 'name' => 'Zvonko']);
     User::create(['email' => 'luka.peharda@gmail.com ', 'password' => Hash::make('password'), 'name' => 'Luka']);
     User::create(['email' => '*****@*****.**', 'password' => Hash::make('password'), 'name' => 'Zoran']);
     User::create(['email' => '*****@*****.**', 'password' => Hash::make('password'), 'name' => 'Goran']);
     User::create(['email' => '*****@*****.**', 'password' => Hash::make('password'), 'name' => 'Franjo']);
     User::create(['email' => '*****@*****.**', 'password' => Hash::make('password'), 'name' => 'Davor']);
     User::create(['email' => '*****@*****.**', 'password' => Hash::make('password'), 'name' => 'Boris']);
 }
Example #25
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     Model::unguard();
     // Clear and create User test data
     User::truncate();
     factory(User::class, 5)->create();
     // Clear and create Datum test data
     Datum::truncate();
     factory(Datum::class, 25)->create();
     Model::reguard();
 }
Example #26
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     \App\Project::truncate();
     \App\Company::truncate();
     \App\User::truncate();
     Model::unguard();
     $this->call(ProjectsTableSeeder::class);
     $this->call(CompaniesTableSeeder::class);
     $this->call(UsersTableSeeder::class);
     Model::reguard();
 }
Example #27
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     User::truncate();
     Post::truncate();
     factory('App\\User', 3)->create()->each(function ($user) {
         $user->posts()->save(factory('App\\Post')->create());
     });
     factory('App\\User', 3)->create()->each(function ($user) {
         $user->posts()->save(factory('App\\Post', 'post-member')->create());
     });
 }
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     User::truncate();
     User::create(['field_id' => '1', 'name' => 'Gino I. de Jesus', 'username' => 'gidj', 'password' => Hash::make('Jesus'), 'email' => '*****@*****.**', 'contact' => '09308229814', 'citycode' => 45808, 'provcode' => 458, 'role' => 'client', 'profile_summary' => 'Computer Science student in PUP Lorem ipsum dolor sit amet, consectetur adipisicing elit. Natus a iusto rerum nihil praesentium quas tempora perferendis nulla molestiae earum reiciendis quibusdam sapiente eaque in, eos id quae explicabo quam.', 'rating' => 0, 'image' => 'avatar.jpg']);
     User::create(['field_id' => '6', 'name' => 'Ben Iglesias', 'username' => 'ben', 'password' => Hash::make('Iglesias'), 'email' => '*****@*****.**', 'contact' => '09362617335', 'citycode' => 45808, 'provcode' => 458, 'role' => 'employee', 'profile_summary' => 'Carpenter for almost 10 years. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Facere voluptatum sed optio veniam porro pariatur sint laudantium ad adipisci dignissimos quod ratione accusantium, nihil odio, blanditiis necessitatibus distinctio sapiente eveniet.', 'tags' => '["roof","holes"]', 'rating' => 0, 'image' => 'mat.png']);
     User::create(['field_id' => '3', 'name' => 'Jose San Juan', 'username' => 'jose', 'password' => Hash::make('SanJuan'), 'email' => '*****@*****.**', 'contact' => '09261328230', 'citycode' => 45809, 'provcode' => 458, 'role' => 'employee', 'profile_summary' => 'Plumber for almost 10 years. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Labore qui cumque, sit deleniti aperiam ratione, aliquam! Sed harum totam minus, repudiandae reiciendis saepe omnis? Atque architecto quasi perferendis similique dicta!', 'tags' => '["leak","pipes"]', 'rating' => 0, 'image' => 'konrad.png']);
     User::create(['field_id' => '2', 'name' => 'James Labnao', 'username' => 'james_kun', 'password' => Hash::make('James'), 'email' => '*****@*****.**', 'contact' => '09158091230', 'citycode' => 137402, 'provcode' => 1339, 'role' => 'employee', 'profile_summary' => 'Professional Mechanic Lorem ipsum dolor sit amet, consectetur adipisicing elit. Itaque debitis omnis et ratione sequi atque tempora. Cum perspiciatis optio mollitia, nihil, dolore nam necessitatibus enim perferendis dolores repellat, ex consectetur?', 'tags' => '["install","assemble", "repair", "maintain", "electric", "elavators", "escalators", "passenger"]', 'rating' => 5, 'image' => 'james.png']);
     User::create(['field_id' => '3', 'name' => 'Noel Escobar', 'username' => 'noeljr', 'password' => Hash::make('IAMALJUR'), 'email' => '*****@*****.**', 'contact' => '092351234982', 'citycode' => 45802, 'provcode' => 458, 'role' => 'employee', 'profile_summary' => 'Experienced Carpenter for 15 years Lorem ipsum dolor sit amet, consectetur adipisicing elit. Vel id, fugit possimus culpa ducimus doloribus soluta dolorem incidunt ipsa facere, aperiam corrupti odio reprehenderit dignissimos perspiciatis! Sequi velit modi, ducimus?', 'tags' => '["roof","holes"]', 'rating' => 0, 'image' => 'noel.png']);
     User::create(['field_id' => '7', 'name' => 'Gerald Cuntapay', 'username' => 'mmagracia', 'password' => Hash::make('Magrace'), 'email' => '*****@*****.**', 'contact' => '09696996996', 'citycode' => 137604, 'provcode' => 1339, 'role' => 'employee', 'profile_summary' => 'Green thumb since birth Lorem ipsum dolor sit amet, consectetur adipisicing elit. Rem minima in sint aspernatur, dicta optio iusto facilis dolorum delectus. Sint quam dolore saepe debitis cum quod est et commodi porro.', 'tags' => '["cultivate","water", "garden", "cut", "trim", "crop", "seed"]', 'rating' => 4, 'image' => 'gerald.png']);
     User::create(['field_id' => '4', 'name' => 'Princessdel', 'username' => 'bendel', 'password' => Hash::make('princeben'), 'email' => '*****@*****.**', 'contact' => '09251238202', 'citycode' => 137404, 'provcode' => 1339, 'role' => 'employee', 'profile_summary' => 'Transportation Inspector for almost 5 years. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sunt tempora iusto quam asperiores, tenetur facere obcaecati non quaerat, sed corporis ex cum, dolorum placeat temporibus quidem explicabo laborum alias enim?', 'tags' => '["rail","transport", "inspectors", "freight", "vehicles", "inspect"]', 'rating' => 1, 'image' => 'del.png']);
     User::create(['field_id' => '5', 'name' => 'Kristine Bayani', 'username' => 'kstine', 'password' => Hash::make('moon'), 'email' => '*****@*****.**', 'contact' => '0926969698', 'citycode' => 45805, 'provcode' => 458, 'role' => 'employee', 'profile_summary' => 'Crane Operator for 2 years. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Deleniti, ea molestiae obcaecati. Incidunt mollitia consequuntur quam amet beatae, provident voluptas quasi voluptatibus! Eum dignissimos dolore asperiores hic perspiciatis explicabo voluptate?', 'tags' => '["mobile", "tower", "cranes", "boom", "trucks"]', 'rating' => 2, 'image' => 'kristine.png']);
 }
Example #29
-1
 /**
  * Seeds the table.
  *
  * @return void
  */
 public function run()
 {
     User::truncate();
     (new User(['name' => 'Example Login', 'email' => self::SAMPLE_LOGIN, 'password' => bcrypt('secret')]))->save();
     $objs = factory(User::class, 10)->make();
     foreach ($objs as $var) {
         (new User(['name' => $var->name, 'email' => $var->email, 'password' => bcrypt('secret')]))->save();
     }
 }
Example #30
-1
 public function run()
 {
     $faker = Faker\Factory::create();
     DB::statement('SET FOREIGN_KEY_CHECKS = 0');
     User::truncate();
     for ($i = 0; $i < 10; $i++) {
         User::create(['name' => $faker->name, 'email' => $faker->email, 'password' => Hash::make('123456789'), 'profile_pic' => $faker->imageUrl(250, 250, 'people')]);
     }
     DB::statement('SET FOREIGN_KEY_CHECKS = 1');
 }