public function signup() { $user = new User(); $user->name = Request::get('name'); $user->email = Request::get('email'); $user->password = Hash::make('password'); $user->save(); //logged in Auth::loginUsingId($user->id); return redirect('/home'); }
/** * Create a new user instance after a valid registration. * * @param array $data * @return User */ public function create(array $data) { return User::create(['name' => $data['name'], 'email' => $data['email'], 'password' => bcrypt($data['password'])]); }