本文整理汇总了PHP中Illuminate\Database\Query\Builder::delete方法的典型用法代码示例。如果您正苦于以下问题:PHP Builder::delete方法的具体用法?PHP Builder::delete怎么用?PHP Builder::delete使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Illuminate\Database\Query\Builder
的用法示例。
在下文中一共展示了Builder::delete方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: delete
function delete($id)
{
$retId = $this->operator->delete($id);
if ($retId) {
//todo if here a bug ?
$obj[$this->pkey] = $retId;
}
return $id;
}
示例2: delete
/**
* delete data
*
* @return int
*/
public function delete()
{
if ($this->dynamic === false) {
return $this->query->delete();
}
$result = $this->query->delete();
if ($this->proxy === true) {
$wheres = $this->query->wheres === null ? [] : $this->query->wheres;
$this->getProxyManager()->delete($wheres);
}
return $result;
}
示例3: forceDelete
/**
* Force a delete on a set of soft deleted models.
*
* @return int
*/
public function forceDelete()
{
return $this->query->delete();
}
示例4: delete
/**
* Delete a record from the database.
*
* @param null|int $id
*
* @return int
*/
public function delete($id = null)
{
$result = parent::delete($id);
$this->handler->setBuilder($this)->setValues([Reflector::PRIMARY_KEY_COLUMN => $id])->setSqlOperation('delete')->invalidateQuery('delete');
return $result;
}
示例5: delete
public function delete($id = null)
{
if ($this->needFlushCache()) {
// 清空表级缓存
$meta = $this->getMeta();
$meta->flush($this->db(), $this->model->table());
$this->flushAffectingRowCache();
}
return parent::delete($id);
}
示例6: delete
function delete($id = null)
{
return $this->_operator->delete($id);
}