/**
  * Delete models from the database by their primary key.
  *
  * @param  mixed $ids
  * @return bool
  */
 public function delete($ids)
 {
     $ids = $this->convertToModelCollection($ids);
     $results = $this->model->destroy($this->hookDelete($ids)->modelKeys());
     $this->reset();
     return $results;
 }
Пример #2
0
 /**
  * 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);
 }
Пример #3
0
 /**
  * @param $id
  * @return mixed
  */
 public function delete($id)
 {
     return $this->model->destroy($id);
 }
Пример #4
0
 public function delete($id)
 {
     return $this->version->destroy($id);
 }