app/Http/Controllers/UsersController.php
/**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
Update the specified resource in storage.
Update the specified resource in storage .
public function update(UserRequest $request, $id)
    {
        $user=User::find($id);
        $user->name = $request->name;
        $user->email = $request->email;
        $user->type = $request->type;
        $user->password = bcrypt($request->password);
        $user->save();
        Flash::success('Usuario <b>'.$user->name.'</b> ha sido editado');
        return redirect()->route('users.index');
    }
public function update ( UserRequest $ request , $ id ) { $ user = User :: find ( $ id ) ; $ user -> name = $ request -> name ; $ user -> email = $ request -> email ; $ user -> type = $ request -> type ; $ user -> password = bcrypt ( $ request -> password ) ; $ user -> save ( ) ; Flash :: success ( 'Usuario <b>' . $ user -> name . '</b> ha sido editado' ) ; return redirect ( ) -> route ( 'users.index' ) ; }
Update the specified resource in storage.
Update the specified resource in storage .