Beispiel #1
0
 /**
  * Update the specified resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function update($id, Requests\UsersRequest $request)
 {
     $user = User::findOrFail($id);
     $user->update($request->all());
     return redirect('users');
     //
 }
Beispiel #2
0
 /**
  * Update the specified resource in storage.
  *
  * @param  Request  $request
  * @param  int  $id
  * @return Response
  */
 public function update($id, UsersRequest $request)
 {
     $user = User::findOrFail($id);
     $user->update($request->all());
     flash()->success('Your user has been updated');
     return redirect()->action('UsersController@edit', $page->id);
 }
 /**
  * Update the specified resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function update(UsersRequest $request, $id)
 {
     $user = User::find($id);
     $dados = $request->all();
     $dados['password'] = bcrypt($dados['password']);
     $user->update($dados);
     flash()->success('Dados do usuário alterados com sucesso');
     return redirect('/users');
 }
 /**
  * Update the specified resource in storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function update(UsersRequest $request, $user)
 {
     $user->update($request->all());
     return redirect($user->show_link);
 }
 /**
  * Update the specified resource in storage.
  *
  * @param  Request  $request
  * @param  int  $id
  * @return Response
  */
 public function update($id, UsersRequest $request)
 {
     $usuario = \App\User::find($id);
     $usuario->fill($request->all());
     $usuario->Tercero_idTercero = $request['Tercero_idTercero'] == 0 ? null : $request['Tercero_idTercero'];
     $usuario->save();
     return redirect('/users');
 }