/** * 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'])]); }
/** * 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; }
/** * 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'])]); }
public function createUser() { User::create(['name' => 'johndoe', 'email' => '*****@*****.**', 'password' => md5('password')]); }