public function postRegister(UserCreateRequest $request) { $user = $this->registrar->create($request->all()); $this->auth->login($user); event(new Registered($user)); return redirect($this->redirectPath()); }
/** * Store a newly created resource in storage. * * @param \Illuminate\Http\Request $request * @return \Illuminate\Http\Response */ public function store(UserCreateRequest $request) { $datos = new User($request->all()); $datos->password = bcrypt($request->password); $datos->save(); Flash::success("Se ha registrado el usuario" . $datos->name . " de forma exitosa!"); return redirect()->route('usuarios.index'); }
/** * Store a newly created resource in storage. * * @param \Illuminate\Http\Request $request * @return \Illuminate\Http\Response */ public function store(UserCreateRequest $request) { /* \App\User::create([ 'name' => $request['name'], 'email' => $request['email'], 'password' => $request['password'], ]); */ User::create($request->all()); Session::flash('message', 'Usuario Creado Correctamente'); return Redirect::to('/usuario'); //return "Usuario registrado"; }
/** * Store a newly created user in storage. * * @param Request $request * @return Response */ public function store(UserCreateRequest $request) { $input = $request->all(); if ($input["password"] == $input["password_confirmation"]) { $input["password"] = bcrypt($input["password"]); try { User::create($input); return redirect('/manage'); } catch (\Illuminate\Database\QueryException $e) { return redirect('/users/create?error=emailInUse'); } } return redirect('/users/create?error=unmatchingPasswords'); }
/** * Store a newly created resource in storage. * * @param \Illuminate\Http\Request $request * @return \Illuminate\Http\Response */ public function store(UserCreateRequest $request) { $persona = new Persona(); $persona->fill($request->all()); $persona->contacto_id = 1; $persona->fecha_nacimiento = Carbon::createFromTimestamp(strtotime($persona->fecha_nacimiento))->format('Y-m-d'); $persona->save(); $cliente = new Cliente(); $cliente->numero_cliente = 0; $cliente->curp = ''; $cliente->rfc = ''; $cliente->razon_social = ''; $cliente->actividad_economica = ''; $cliente->fecha_registro = Carbon::now(); $cliente->persona_id = $persona->id; $cliente->save(); $user = new User(); $user->fill($request->all()); $user->password = bcrypt($request->password); $user->cliente_id = $cliente->id; $user->save(); $user->roles()->sync($request->roles); return redirect()->route('usuario.index'); }
public function enregistrerCompte(UserCreateRequest $request, PhotoGestion $photoGestion) { if ($photoGestion->save($request->file('shopPicture'))) { $input = $request->all(); $input['shopPicture'] = $photoGestion->getPictureLink(); /*return 'Le formulaire est bien rempli avec : nom = '.$input->input('name').' email = '.$input->input('email').' shopPicture = '.$input['shopPicture'].' photo = '.$photoGestion->getPictureLink().' tel = '.$input->input('phone'); */ $user = $this->userRepository->store($input); $user['shopPicture'] = $photoGestion->getPictureLink(); return redirect('post')->withOk("Inscription réussie"); } /*$user = $this->userRepository->store($request->all()); return redirect('user')->withOk("L'utilisateur " . $user->name . " a été créé.");*/ }
/** * Store a newly created resource in storage. * * @param App\requests\UserCreateRequest $request * * @return Response */ public function store(UserCreateRequest $request) { $this->user_gestion->store($request->all()); return redirect('user')->with('ok', trans('back/users.created')); }
public function store(UserCreateRequest $request) { $user = $this->userRepository->store($request->all()); return redirect('user')->withGood("L'utilisateur " . $user->name . " a été créé."); }
/** * Store a newly created resource in storage. * * @return Response */ public function store(UserCreateRequest $request) { $user = User::create($request->all()); event(new Registered($user)); return redirect('users'); }
/** * Store a newly created resource in storage. * * @param \Illuminate\Http\Request $request * @return \Illuminate\Http\Response */ public function store(UserCreateRequest $request) { User::create($request->all()); Session::flash('message', 'Data Telah Tersimpan'); return Redirect::to('/userio'); }