Beispiel #1
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     $status_list = array('admin', 'employee', 'intern');
     $user = \CareCats\User::firstOrCreate(['email' => '*****@*****.**']);
     $user->first_name = 'Heidi';
     $user->last_name = 'CARE';
     $user->status = 'admin';
     $user->email = '*****@*****.**';
     $user->password = \Hash::make('helloworld');
     $user->save();
     $user = \CareCats\User::firstOrCreate(['email' => '*****@*****.**']);
     $user->first_name = 'Jill';
     $user->last_name = 'Jacobson';
     $user->status = 'employee';
     $user->email = '*****@*****.**';
     $user->password = \Hash::make('helloworld');
     $user->save();
     $user = \CareCats\User::firstOrCreate(['email' => '*****@*****.**']);
     $user->first_name = 'Jamal';
     $user->last_name = 'Jones';
     $user->status = 'intern';
     $user->email = '*****@*****.**';
     $user->password = \Hash::make('helloworld');
     $user->save();
 }
Beispiel #2
0
 /**
  * Create a new user instance after a valid registration.
  *
  * @param  array  $data
  * @return User
  */
 protected function create(array $data)
 {
     return User::create(['first_name' => $data['first_name'], 'email' => $data['email'], 'password' => bcrypt($data['password'])]);
 }