當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。