Ejemplo n.º 1
0
 /**
  * Create a new user instance after a valid registration.
  *
  * @param  array  $data
  * @return User
  */
 protected function create(array $data)
 {
     return User::create(['email' => $data['email'], 'password' => bcrypt($data['password'])]);
 }
Ejemplo n.º 2
0
 /**
  * Handle register request
  * @param  RegisterRequest $request
  * @return redirect
  */
 public function registerHandle(RegisterRequest $request)
 {
     $password = Hash::make($request->get('password'));
     $user = User::create(['email' => $request->get('email'), 'password' => $password]);
     return redirect()->route('auth.login');
 }