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')]); } }
/** * 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'])]); }