/** * Delete one or more model records from the database * * @return mixed */ public function delete() { $this->newQuery()->setClauses()->setScopes(); $result = $this->query->delete(); $this->unsetClauses(); return $result; }
/** * Deletes an item if an id is specified, deletes all queried entries otherwise * * @param integer $id * @return bool */ public function delete($id = null) { if ($id === null) { $delete = $this->builder->delete(); $this->newBuilder(); return $delete; } return $this->builder->destroy($id); }
/** * Delete a record from the database. * * @return mixed */ public function delete() { // Intercept operations on embedded models and delegate logic // to the parent relation instance. if ($relation = $this->model->getParentRelation()) { $relation->performDelete($this->model); return $this->model->getKey(); } return parent::delete(); }
/** * @return bool|null * @throws \Exception */ public function delete() { $this->specificationQuery->delete(); return true; }
/** * Delete a record from the database. * * @return mixed */ public function delete() { $this->model->fireEvent('deletingMultiple'); $return = parent::delete(); $this->model->fireEvent('deletedMultiple'); return $return; }
public function delete() { if ($this->eagerLoad) { $this->prepareQuery(); $this->buildRelationshipTree(); $this->applyRelationshipQuery($this->relations); $this->reformatQueryComponents(); } parent::delete(); }