Ejemplo n.º 1
0
 public function run()
 {
     $faker = Factory::create();
     User::create(['name' => "admin", 'email' => "*****@*****.**", 'password' => Hash::make('admin')]);
     User::create(['name' => "user", 'email' => "*****@*****.**", 'password' => Hash::make('user')]);
     for ($i = 0; $i < 30; $i++) {
         User::create(['name' => str_replace('.', '_', $faker->unique()->userName), 'email' => $faker->unique()->email, 'password' => Hash::make('password')]);
     }
 }
Ejemplo 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(['name' => $data['name'], 'email' => $data['email'], 'password' => bcrypt($data['password'])]);
 }