Deletes a Resource

@param string $id
@return mixed
767016
public function delete(string $id)
    {
        if ($this->can('delete')) {

            $this->flow->getLogger()->debug("Deleting Resource: $this->id => $id");

            return $this->make(
                $this->performDelete($this->id, $id)
            );
        }
        throw new \BadMethodCallException('Method '.__FUNCTION__.' does not exist');
    }
1060175
public function deleteAction($id)
    {
        $response = $this->getResponse();
        $this->model->deleteRecord($id);
        $response->setStatusCode(Response::HTTP_NO_CONTENT);

        return $response;
    }
1089849
public function destroy($id)
    {
        $language = Language::find($id);
        $destroyResult = parent::destroy($id);

        if ($destroyResult) {
            \File::deleteDirectory(resource_path('lang/'.$language->abbr));
        }

        return $destroyResult;
    }
846748
public function destroy($id)
    {
        $user = $this->userRepo->getById($id);

        if (!empty($user)) {
            $this->authorize('delete', $user);
            $user->delete();
            return $this->respondWithSimpleSuccess(['success' => true]);
        }
        return $this->respondNotFound();
    }
1280573
public function delete($id)
    {
        $result = Eresus_CMS::getLegacyKernel()->db->delete($this->table, "`id`=$id");
        return $result;
    }
475921
protected function deleteRequest($id)
    {
        $query = "DELETE FROM {$this->config->table_requests} WHERE id = :id";
        $query_prepared = $this->dbh->prepare($query);
        return $query_prepared->execute(['id' => $id]);
    }
1120978
public function delete($id) {
        $object = $this->getContainer()->dataObject();
        $object->setName($id);

        /** @type \Guzzle\Http\Message\Response $response */
        $response = $object->delete();

        return $response->isSuccessful();
    }
1271644
public function actionDelete($id)
    {
        $this->findModel($id)->delete();
        Yii::$app->getSession()->setFlash('success', Yii::t('system', 'Delete success.'));
        return $this->redirect(['index']);
    }
806405
public function actionDelete($id)
    {
        if (Yii::$app->request->isPost) {
            $this->findModel($id)->delete();
        }
        return $this->redirect(['index']);
    }
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;
    }
993535
public function destroy($id)
    {
        $find = $this->findResourceCallable($id);

        $delete = $this->deleteResourceCallable($id);

        $resource = new DeleteResource($this->serializer);

        return $this->addHeaders($resource->get($id, get_class($this->getDataModel()), $find, $delete));
    }
626899
public function delete($id) {
        return $this->request("DELETE", self::URL_ORDERS . $id . "/", $api_key = $this->culqi->api_key);
    }
5333
public function destroy($id)
    {
        $permission = $this->repository->findWithoutFail($id);

        if (empty($permission)) {
            return $this->sendError('Permission not found');
        }

        $this->repository->delete($id);

        return $this->sendResponse($permission, 'Permission deleted successfully.');
    }
1253272
public function destroy($id)
    {
        $file = $this->fileRepo->getById($id);

        if (!empty($file)) {
            $this->authorize('delete', $file);
            $this->fileRepo->delete($file);
            return $this->respondWithSimpleSuccess(['success' => true]);
        }
        return $this->respondNotFound();
    }
1222968
public function deleteAction($id)
    {
        $response = parent::deleteAction($id);
        $this->fileManager->remove($id);
        return $response;
    }
787403
public function delete($id) {
		$dt = $this->getDataTable();
		
		if (! $dt)
			return $this->createResponse($this->getNameManager()->getTableNames(), 401, "Tabels");
		
		return $this->createResponse([], 200, "{$this->getNameManager()->entityName}: No Delete");
	}
1216058
public function delete($id)
    {
        $response = $this->restClient->delete($this->endpoint . '/' . $id);

        return $response['body'];
    }