public function remove($assetId, $workOrderId)
    {
        if ($this->asset->detachWorkOrder($assetId, $workOrderId)) {
            $message = 'Successfully detached work order.';

            return redirect()->route('maintenance.assets.work-orders.index', [$assetId])->withSuccess($message);
        } else {
            $message = 'There was an issue detaching this work order. Please try again.';

            return redirect()->route('maintenance.assets.work-orders.index', [$assetId])->withErrors($message);
        }
    }
public function remove($assetId, $workOrderId)
    {
        if ($this->asset->detachWorkOrder($assetId, $workOrderId)) {
            $message = 'Successfully detached work order.';

            return redirect()->route('maintenance.assets.work-orders.index', [$assetId])->withSuccess($message);
        } else {
            $message = 'There was an issue detaching this work order. Please try again.';

            return redirect()->route('maintenance.assets.work-orders.index', [$assetId])->withErrors($message);
        }
    }
public function remove ( $ assetId , $ workOrderId ) { if ( $ this -> asset -> detachWorkOrder ( $ assetId , $ workOrderId ) ) { $ message = 'Successfully detached work order.' ; return redirect ( ) -> route ( 'maintenance.assets.work-orders.index' , [ $ assetId ] ) -> withSuccess ( $ message ) ; } else { $ message = 'There was an issue detaching this work order. Please try again.' ; return redirect ( ) -> route ( 'maintenance.assets.work-orders.index' , [ $ assetId ] ) -> withErrors ( $ message ) ; } }
Removes the specified work order from the specified asset.

@param int|string $assetId
@param int|string $workOrderId

@return \Illuminate\Http\RedirectResponse
Removes the specified work order from the specified asset .