public function update(AssetRequest $request, $id)
    {
        $asset = $this->asset->findOrFail($id);

        $asset->tag = $request->input('tag');
        $asset->category_id = $request->input('category');
        $asset->location_id = $request->input('location');
        $asset->name = $request->input('name');
        $asset->condition = $request->input('condition');
        $asset->vendor = $request->input('vendor');
        $asset->make = $request->input('make');
        $asset->model = $request->input('model');
        $asset->size = $request->input('size');
        $asset->weight = $request->input('weight');
        $asset->serial = $request->input('serial');
        $asset->acquired_at = $request->formatDateWithTime($request->input('acquired_at'));
        $asset->end_of_life = $request->formatDateWithTime($request->input('end_of_life'));

        return $asset->save();
    }
public function update(AssetRequest $request, $id)
    {
        $asset = $this->asset->findOrFail($id);

        $asset->tag = $request->input('tag');
        $asset->category_id = $request->input('category');
        $asset->location_id = $request->input('location');
        $asset->name = $request->input('name');
        $asset->condition = $request->input('condition');
        $asset->vendor = $request->input('vendor');
        $asset->make = $request->input('make');
        $asset->model = $request->input('model');
        $asset->size = $request->input('size');
        $asset->weight = $request->input('weight');
        $asset->serial = $request->input('serial');
        $asset->acquired_at = $request->formatDateWithTime($request->input('acquired_at'));
        $asset->end_of_life = $request->formatDateWithTime($request->input('end_of_life'));

        return $asset->save();
    }
public function update ( AssetRequest $ request , $ id ) { $ asset = $ this -> asset -> findOrFail ( $ id ) ; $ asset -> tag = $ request -> input ( 'tag' ) ; $ asset -> category_id = $ request -> input ( 'category' ) ; $ asset -> location_id = $ request -> input ( 'location' ) ; $ asset -> name = $ request -> input ( 'name' ) ; $ asset -> condition = $ request -> input ( 'condition' ) ; $ asset -> vendor = $ request -> input ( 'vendor' ) ; $ asset -> make = $ request -> input ( 'make' ) ; $ asset -> model = $ request -> input ( 'model' ) ; $ asset -> size = $ request -> input ( 'size' ) ; $ asset -> weight = $ request -> input ( 'weight' ) ; $ asset -> serial = $ request -> input ( 'serial' ) ; $ asset -> acquired_at = $ request -> formatDateWithTime ( $ request -> input ( 'acquired_at' ) ) ; $ asset -> end_of_life = $ request -> formatDateWithTime ( $ request -> input ( 'end_of_life' ) ) ; return $ asset -> save ( ) ; }
Updates the specified asset.

@param AssetRequest $request
@param int|string   $id

@return bool
Updates the specified asset .