app/Http/Controllers/WorkOrder/WorkOrderAttachmentController.php
public function destroy($workOrderId, $attachmentId)
    {
        if ($this->processor->destroy($workOrderId, $attachmentId)) {
            flash()->success('Success!', 'Successfully deleted attachment.');

            return redirect()->route('maintenance.work-orders.attachments.index', [$workOrderId]);
        } else {
            flash()->error('Error!', 'There was an issue deleting this attachment. Please try again.');

            return redirect()->route('maintenance.work-orders.attachments.show', [$workOrderId, $attachmentId]);
        }
    }
public function destroy($workOrderId, $attachmentId)
    {
        if ($this->processor->destroy($workOrderId, $attachmentId)) {
            flash()->success('Success!', 'Successfully deleted attachment.');

            return redirect()->route('maintenance.work-orders.attachments.index', [$workOrderId]);
        } else {
            flash()->error('Error!', 'There was an issue deleting this attachment. Please try again.');

            return redirect()->route('maintenance.work-orders.attachments.show', [$workOrderId, $attachmentId]);
        }
    }
Processes deleting an attachment record and the file itself.

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

@return \Illuminate\Http\RedirectResponse