Esempio n. 1
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     $faker = Faker\Factory::create();
     User::create(['id' => null, 'username' => "admin", 'email' => "*****@*****.**", 'password' => Hash::make("admin")]);
     for ($i = 0; $i < 29; $i++) {
         User::create(['id' => null, 'username' => $faker->userName(), 'email' => $faker->email(), 'password' => $faker->md5()]);
     }
 }
Esempio n. 2
0
 /**
  * Create a new user instance after a valid registration.
  *
  * @param  array  $data
  * @return User
  */
 public function create(array $data)
 {
     return User::create(['username' => $data['username'], 'email' => $data['email'], 'password' => bcrypt($data['password'])]);
 }