app/Http/Controllers/UserController.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(UpdateUserRequest $request, User $user)
    {
        $inputs = $request->except('password_confirmation', 'submit', '_method', '_token');
        if ($request->password !== null) {
            $inputs['password'] = md5($request->password);
        }
        $user->update($inputs);
        return $this->redirect($user);
    }
public function update ( UpdateUserRequest $ request , User $ user ) { $ inputs = $ request -> except ( 'password_confirmation' , 'submit' , '_method' , '_token' ) ; if ( $ request -> password !== null ) { $ inputs [ 'password' ] = md5 ( $ request -> password ) ; } $ user -> update ( $ inputs ) ; return $ this -> redirect ( $ user ) ; }
Update the specified resource in storage.
Update the specified resource in storage .
// $inputs['avatar'] = File::update('users', 'avatar', $user);