Delete model data from db.

@param string $id model id

@return bool
558814
public function delete($id = null)
    {
        if (!is_null($id)) {
            $this->setId($id);
        }

        return $this->getDbGateway()->delete($this->getId());
    }
854915
public function remove($id)
    {
        try {
            return $this->resource->delete([
                'index' => $this->schema->getName(),
                'type' => static::INDEX_TYPE,
                'id' => $id
            ]);
        } catch (NoNodesAvailableException $e) {
            return false;
        }
    }
283691
public function delete($id = null)
    {
        // This allows for delete based on the primary key
        if ($id && !$this->exists) {
            $this->setAttribute($this->getKeyName(), $id);
            $this->exists = true;
        }

        // Can't delete something that doesn't exists
        if ($this->exists) {
            if ($this->fireModelEvent('deleting') === false) {
                return false;
            }

            $this->performDeleteOnModel();

            $this->exists = false;

            // Once the model has been deleted, we will fire off the deleted event so that
            // the developers may hook into post-delete operations. We will then return
            // a boolean true as the delete is presumably successful on the database.
            $this->fireModelEvent('deleted', false);

            return true;
        }

        return false;
    }
1117474
public function remove($id)
    {
        if (false === $this->_cache->delete($id)) {
            return $this->_onError('remove');
        }

        return true;
    }
781617
public static function destroy($id)
    {
        $table = self::getTableNameFromClass();

        self::getOne($id);

        $query = "DELETE FROM $table WHERE id = ".$id;

        try {
            Connection::db()->query($query);
            return true;
        } catch (Exception $e) {
            return false;
        }
    }
137929
public function deleteById($id)
	{
		$sql = "DELETE FROM `$this->tableName` WHERE `$this->pkColName` = :entityId ";

		$stmt = $this->pdo->prepare($sql);
		$stmt->bindParam(':entityId', intval($id), \PDO::PARAM_INT);
		$res = $stmt->execute();

		return ($res !== false && $stmt->rowCount() === 1);
	}
193380
public function destroySession($id)
    {
        $this->db->getCollection($this->sessionCollection)->remove(
            ['id' => $id],
            ['justOne' => true]
        );

        return true;
    }
115885
public function delete(string $id)
    {
        $this->request->allowMethod(['post', 'delete']);
        $dblist = $this->Dblists->get($id);
        if ($this->Dblists->delete($dblist)) {
            $this->Flash->success('The database list has been deleted.');
        } else {
            $this->Flash->error('The database list could not be deleted. Please, try again.');
        }

        return $this->redirect(['action' => 'index']);
    }
194529
public function delete($id)
    {
        $idName = ucfirst($this->idProperty->getName());
        return $this->__call("deleteBy$idName", array($id));
    }
1140786
public function delete($id = null)
    {
        if (! is_null($id)) $this->where('id', '=', $id);

        $sql = $this->grammar->compileDelete($this);

        return $this->connection->delete($sql, $this->getBindings());
    }
32674
public function destroy($id)
    {
        $ids = explode(',', $id);

        foreach ($ids as $id) {
            if (empty($id)) {
                continue;
            }
            $this->deleteFilesAndImages($id);
            $this->model->find($id)->delete();
        }

        return true;
    }
971454
public function destroy($id)
    {
        if ($this->model->deleteEnv($id)) {
            $data = [
                'status' => true,
                'message' => trans('admin.delete_succeeded'),
            ];
        } else {

            $data = [
                'status' => false,
                'message' => trans('admin.delete_failed'),
            ];
        }

        return response()->json($data);
    }
1176423
public function delete($id) {
        $this->checkPermissions('delete');
        
        return $this->client->deleteData($this->resourceName . '/' . $id);
    }
944106
public function deleteCustomerById($id): bool
    {
        $record = CustomerRecord::findOne($id);

        if ($record) {
            return (bool)$record->delete();
        }

        return false;
    }
774694
public function delete( $id ) {

		if ( $this->contains( $id ) ) {
			$this->count--;
			$this->cacheDeletes++;
			unset( $this->cache[ $id ] );
			unset( $this->ttl[ $id ] );
			return true;
		}

		return false;
	}
954869
function Delete($id) {
		$this->LoadSchema();

		$data = array($this->schema['_id']['field'] => $id);

		$this->ResetQuery(array(
			'method' => 'delete',
			'table' => $this->table,
			'where' => array(
				$this->schema['_id']['field'] => $id,
			),
		));

		$this->Trigger('access', $data);
		if (!$this->continue)
			return FALSE;

		$this->Trigger('push', $data);
		if (!$this->continue)
			return FALSE;

		$this->Trigger('delete', $id);
		if (!$id)
			return FALSE;
		if (!$this->continue)
			return FALSE;

		$this->db->from($this->table);
		$this->db->where("{$this->table}.{$this->schema['_id']['field']}", $id);
		$this->db->delete();

		$this->Trigger('deleted', $id);
		return TRUE;
	}
390698
public function delete($id)
    {
        $id = explode(',', $id);

        if ($this->request->isPost() || $this->request->isDelete()) {
            $single = false;
            if (count($id) === 1) {
                $single = true;
            }

            try {
                $this->data['entries'] = array();

                foreach ($id as $value) {
                    $model = $this->collection->findOne($value);

                    if (is_null($model)) {
                        if ($single) {
                            $this->app->notFound();
                        }

                        continue;
                    }

                    $model->remove();

                    $this->data['entries'][] = $model;
                }

                h('notification.info', $this->clazz.' deleted.');

                h('controller.delete.success', array(
                    'models' => $this->data['entries'],
                ));

            } catch (Stop $e) {
                throw $e;
            } catch (Exception $e) {
                h('notification.error', $e);

                if (empty($model)) {
                    $model = null;
                }

                h('controller.delete.error', array(
                    'error' => $e,
                    'model' => $model,
                ));
            }

        }
    }