public function destroy($id)
    {
        if ($this->processor->destroy($id)) {
            flash()->success('Success!', 'Successfully deleted inventory item.');

            return redirect()->route('maintenance.inventory.index');
        } else {
            flash()->error('Error!', 'There was an issue deleting this inventory item. Please try again.');

            return redirect()->route('maintenance.inventory.show', [$id]);
        }
    }
public function destroy($id)
    {
        if ($this->processor->destroy($id)) {
            flash()->success('Success!', 'Successfully deleted inventory item.');

            return redirect()->route('maintenance.inventory.index');
        } else {
            flash()->error('Error!', 'There was an issue deleting this inventory item. Please try again.');

            return redirect()->route('maintenance.inventory.show', [$id]);
        }
    }
public function destroy ( $ id ) { if ( $ this -> processor -> destroy ( $ id ) ) { flash ( ) -> success ( 'Success!' , 'Successfully deleted inventory item.' ) ; return redirect ( ) -> route ( 'maintenance.inventory.index' ) ; } else { flash ( ) -> error ( 'Error!' , 'There was an issue deleting this inventory item. Please try again.' ) ; return redirect ( ) -> route ( 'maintenance.inventory.show' , [ $ id ] ) ; } }
Deletes the specified inventory item.

@param int|string $id

@return \Illuminate\Http\RedirectResponse
Deletes the specified inventory item .