当前位置: 首页>>代码示例>>PHP>>正文


PHP Builder::delete方法代码示例

本文整理汇总了PHP中Illuminate\Database\Eloquent\Builder::delete方法的典型用法代码示例。如果您正苦于以下问题:PHP Builder::delete方法的具体用法?PHP Builder::delete怎么用?PHP Builder::delete使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Illuminate\Database\Eloquent\Builder的用法示例。


在下文中一共展示了Builder::delete方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: delete

 /**
  * 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;
 }
开发者ID:Okipa,项目名称:una.app,代码行数:12,代码来源:BaseRepository.php

示例2: delete

 /**
  * 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);
 }
开发者ID:kodebyraaet,项目名称:pattern,代码行数:15,代码来源:BaseRepository.php

示例3: delete

 /**
  * 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();
 }
开发者ID:errietta,项目名称:laravel-mongodb,代码行数:15,代码来源:Builder.php

示例4: delete

 /**
  * @return bool|null
  * @throws \Exception
  */
 public function delete()
 {
     $this->specificationQuery->delete();
     return true;
 }
开发者ID:middleout,项目名称:doplio,代码行数:9,代码来源:AbstractRepository.php

示例5: delete

 /**
  * Delete a record from the database.
  *
  * @return mixed
  */
 public function delete()
 {
     $this->model->fireEvent('deletingMultiple');
     $return = parent::delete();
     $this->model->fireEvent('deletedMultiple');
     return $return;
 }
开发者ID:jacksun101,项目名称:streams-platform,代码行数:12,代码来源:EloquentQueryBuilder.php

示例6: delete

 public function delete()
 {
     if ($this->eagerLoad) {
         $this->prepareQuery();
         $this->buildRelationshipTree();
         $this->applyRelationshipQuery($this->relations);
         $this->reformatQueryComponents();
     }
     parent::delete();
 }
开发者ID:fembri,项目名称:eloficient,代码行数:10,代码来源:Builder.php


注:本文中的Illuminate\Database\Eloquent\Builder::delete方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。