public function update(MeterRequest $request, $id, $meterId)
    {
        $meter = $this->meter->update($request, $id, $meterId);

        if ($meter) {
            $message = 'Successfully updated meter.';

            return redirect()->route('maintenance.assets.meters.show', [$id, $meter->id])->withSuccess($message);
        } else {
            $message = 'There was an issue updating this meter. Please try again.';

            return redirect()->route('maintenance.assets.meters.edit', [$id, $meterId])->withErrors($message);
        }
    }
public function update(MeterRequest $request, $id, $meterId)
    {
        $meter = $this->meter->update($request, $id, $meterId);

        if ($meter) {
            $message = 'Successfully updated meter.';

            return redirect()->route('maintenance.assets.meters.show', [$id, $meter->id])->withSuccess($message);
        } else {
            $message = 'There was an issue updating this meter. Please try again.';

            return redirect()->route('maintenance.assets.meters.edit', [$id, $meterId])->withErrors($message);
        }
    }
public function update ( MeterRequest $ request , $ id , $ meterId ) { $ meter = $ this -> meter -> update ( $ request , $ id , $ meterId ) ; if ( $ meter ) { $ message = 'Successfully updated meter.' ; return redirect ( ) -> route ( 'maintenance.assets.meters.show' , [ $ id , $ meter -> id ] ) -> withSuccess ( $ message ) ; } else { $ message = 'There was an issue updating this meter. Please try again.' ; return redirect ( ) -> route ( 'maintenance.assets.meters.edit' , [ $ id , $ meterId ] ) -> withErrors ( $ message ) ; } }
Updates the specified meter attached to the specified asset.

@param MeterRequest $request
@param int|string   $id
@param int|string   $meterId

@return \Illuminate\Http\RedirectResponse
Updates the specified meter attached to the specified asset .