BookStack\Http\Controllers\AttachmentController::delete PHP Метод

delete() публичный Метод

Delete a specific attachment in the system.
public delete ( $attachmentId ) : mixed
$attachmentId
Результат mixed
    public function delete($attachmentId)
    {
        $attachment = $this->attachment->findOrFail($attachmentId);
        $this->checkOwnablePermission('attachment-delete', $attachment);
        $this->attachmentService->deleteFile($attachment);
        return response()->json(['message' => 'Attachment deleted']);
    }