Пример #1
0
 /**
  * Create a new user instance after a valid registration.
  *
  * @param  array  $data
  * @return User
  */
 protected function create(array $data)
 {
     bcrypt('password');
     return User::create(['username' => $data['username'], 'email' => $data['email'], 'password' => md5($data['password'])]);
 }
Пример #2
0
 /**
  * Find or create a new instance of a social user.
  *
  * @param array $data
  * @return User
  */
 protected function findOrCreateSocialUser(array $data)
 {
     $user = User::where('social_id', $data['social_id'])->first();
     if (is_null($user)) {
         return User::create($data);
     }
     return $user;
 }
Пример #3
0
 /**
  * Create a new user instance after a valid registration.
  *
  * @param  array  $data
  * @return User
  */
 protected function create(array $data)
 {
     return User::create(['name' => $data['name'], 'email' => $data['email'], 'password' => bcrypt($data['password'])]);
 }
Пример #4
0
 public function createUser()
 {
     User::create(['name' => 'johndoe', 'email' => '*****@*****.**', 'password' => md5('password')]);
 }