app/Http/Controllers/UserController.php
/**
     * Update the specified user in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
Update the specified user in storage.
Update the specified user in storage .
public function update(UserRequest $request, $id)
    {
        $data = $request->all();
        if ($data['password'] == null) {
            unset($data['password']);
        }
        $data['ts_update'] = Carbon::now()->timestamp;
        User::find($id)->update($data);
        return redirect()->route('user.index')->with('edit', 'The selected user has been updated');
    }
public function update ( UserRequest $ request , $ id ) { $ data = $ request -> all ( ) ; if ( $ data [ 'password' ] == null ) { unset ( $ data [ 'password' ] ) ; } $ data [ 'ts_update' ] = Carbon :: now ( ) -> timestamp ; User :: find ( $ id ) -> update ( $ data ) ; return redirect ( ) -> route ( 'user.index' ) -> with ( 'edit' , 'The selected user has been updated' ) ; }
Update the specified user in storage.
Update the specified user in storage .