Delete a Note object
@param string $id UUID of the Note
@return \Illuminate\Http\Response JSON object with status message
977514
public function destroy($id)
    {
        $note = Note::findOrFail($id);
        $this->authorize('manage', $note);
        $note->delete();
        return fractal($id, new DeletedTransformer())
            ->withResourceName('deletedNote')
            ->respond();
    }
1047130
public function deleteById($id)
    {
        $deleteResult = $this->getRequest()->request(
            'DELETE',
            $this->getRequestUrl(sprintf('inputs/%s', $id))
        );

        return $deleteResult['status'];
    }
744716
public function deleteShift($id)
    {
        list($response, $statusCode, $httpHeader) = $this->deleteShiftWithHttpInfo ($id);
        return $response; 
    }
511708
public function iconSetDeleteAction($id)
    {
        $iconSet = $this->iconSetManager->getIconSetById($id);
        if (null !== $iconSet) {
            $this->iconSetManager->deleteIconSet($iconSet);
        }

        return new JsonResponse(['deleted' => true]);
    }
732870
public function delete($id)
    {
        $supported = $this->isSupported('delete');

        return (true === $supported) ? $this->makeRequest($this->endpoint.'/'.$id.'/delete', array(), 'DELETE') : $supported;
    }
850630
public function destroy($id)
    {
        try {
            if (($ret = $this->callDeleting()) instanceof Response) {
                return $ret;
            }

            collect(explode(',', $id))->filter()->each(function ($id) {
                $builder = $this->model()->newQuery();

                if ($this->isSoftDeletes) {
                    $builder = $builder->withTrashed();
                }

                $model = $builder->with($this->getRelations())->findOrFail($id);

                if ($this->isSoftDeletes && $model->trashed()) {
                    $this->deleteFiles($model, true);
                    $model->forceDelete();

                    return;
                }

                $this->deleteFiles($model);
                $model->delete();
            });

            if (($ret = $this->callDeleted()) instanceof Response) {
                return $ret;
            }

            $response = [
                'status'  => true,
                'message' => trans('admin.delete_succeeded'),
            ];
        } catch (\Exception $exception) {
            $response = [
                'status'  => false,
                'message' => $exception->getMessage() ?: trans('admin.delete_failed'),
            ];
        }

        return response()->json($response);
    }
993792
public function deleteAction($id)
    {
        /** @var PostInterface $post */
        $post = $this->get('opifer.form.post_manager')->getRepository()->find($id);

        if (!$post) {
            return $this->createNotFoundException();
        }
        
        $form = $post->getForm();

        $em = $this->getDoctrine()->getManager();
        $em->remove($post);
        $em->flush();

        return $this->redirectToRoute('opifer_form_post_index', ['formId' => $form->getId()]);
    }
1287791
public function delete($id)
    {
        $db = new DB();
        $result = $db->db()->delete(['db_name'=>__config()->auth->db_name, 'table'=>__config()->auth->db_table, 'wheres'=>['id ='."'{$id}'"]]);
        $db->db()->close();

        return $result;
    }
579262
public function destroy($id)
	{
		$entity = UUID::findOrFail($id)->entity;
		return ResourceController::resolveController($entity)->destroy($entity);
	}
1192511
public function deleteFromFlexiBee($id = null)
    {
        if (is_null($id)) {
            $id = $this->getMyKey();
        }

        $this->performRequest($this->getEvidenceUrl().'/'.self::urlizeId($id),
            'DELETE');
        return $this->lastResponseCode == 200;
    }
1216058
public function delete($id)
    {
        $response = $this->restClient->delete($this->endpoint . '/' . $id);

        return $response['body'];
    }
654604
public function delete($id)
    {
        $db = new DatabaseManager();
        $connection = $db->getDbh();

        $sql = 'DELETE from :table WHERE id=:id';
        $sql = str_replace(':table', $this->tableName, $sql);

        $statement = $connection->prepare($sql);
//        $statement->bindParam(':table',  $this->tableName);
        $statement->bindParam(':id', $id, \PDO::PARAM_INT);

        $queryWasSuccessful = $statement->execute();
        return $queryWasSuccessful;
    }
1048882
public function destroy($id)
    {
        $class = $this->model;

        return $class::destroy($id)
            ? ['success' => ucfirst($this->readableResourceType()) . ' removed successfully.']
            : ['error' => 'There was a problem removing the ' . $this->readableResourceType() . '.'];
    }
650810
public function deleteById($id)
    {
        $this->validateTableAndIdentityColumn();
        // If the soft delete is activated
        if ($this->deleteColumnName) {
            $query = <<<EOQ
UPDATE {$this->getTableName()}
SET {$this->deleteColumnName} = 1
WHERE {$this->escapeCharacter}{$this->identityColumn}{$this->escapeCharacter} = %s
EOQ;
        } else {
            $query = <<<EOQ
DELETE FROM {$this->getTableName()}
WHERE {$this->escapeCharacter}{$this->identityColumn}{$this->escapeCharacter} = %s
EOQ;
        }

        $params = array('identity' => $id);

        return (bool)$this->db->query($query, $params);
    }
1060175
public function deleteAction($id)
    {
        $response = $this->getResponse();
        $this->model->deleteRecord($id);
        $response->setStatusCode(Response::HTTP_NO_CONTENT);

        return $response;
    }
1102998
public function deleteCustomer($id)
    {
        try {
            $response = $this->client->delete('/api/v1/customers/'.$id, array(
                'auth' => $this->auth,
            ));
        } catch (BadResponseException $e) {
            $response = $e->getResponse();
        } catch (RequestException $e) {
            return new Response($e->getCode(), $e->getMessage());
        }

        return new Response($response->getStatusCode(), $response->getReasonPhrase());
    }
1147229
public function delete($id)
	{
		$this->getResponse()
			->setStatusCode(Response::STATUS_CODE_200);
		
		try {
			$imageService = $this->getServiceLocator()->get('document.service.image');
			$document = $imageService->delete($id);
			$data = array(
				'status' => 'success',
				'message' => "Deleted " . $id
			);
		} catch(\Exception $e) {
			$this->getResponse()
				->setStatusCode(Response::STATUS_CODE_500);
			$data = array(
				'status' => 'danger',
				'message' => $e->getMessage() 
			);
		}
		
		return new JsonModel($data);
	}