public function run() { $faker = Faker\Factory::create(); User::create(['username' => 'jstoone', 'password' => 'secret']); foreach (range(1, 50) as $index) { User::create(['username' => $faker->userName, 'password' => 'secret']); } }
/** * Create a new user instance after a valid registration. * * @param array $data * @return User */ public function create(array $data) { $user = User::create(['username' => $data['username'], 'password' => $data['password']]); flash()->success("Welcome " . $user->username . "!"); return $user; }