public function destroy($workOrderId, $attachmentId)
    {
        $workOrder = $this->workOrder->findOrFail($workOrderId);

        $attachment = $workOrder->attachments()->findOrFail($attachmentId);

        return $this->dispatch(new Destroy($attachment));
    }
public function destroy($workOrderId, $attachmentId)
    {
        $workOrder = $this->workOrder->findOrFail($workOrderId);

        $attachment = $workOrder->attachments()->findOrFail($attachmentId);

        return $this->dispatch(new Destroy($attachment));
    }
public function destroy ( $ workOrderId , $ attachmentId ) { $ workOrder = $ this -> workOrder -> findOrFail ( $ workOrderId ) ; $ attachment = $ workOrder -> attachments ( ) -> findOrFail ( $ attachmentId ) ; return $ this -> dispatch ( new Destroy ( $ attachment ) ) ; }
Deletes the specified work order attachment.

@param int|string $workOrderId
@param int|string $attachmentId

@return bool
Deletes the specified work order attachment .