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


PHP Eloquent::delete方法代码示例

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


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

示例1: delete

 public function delete()
 {
     $this->handle_before_destroy();
     $result = parent::delete();
     $this->update_later_balance();
     return $result;
 }
开发者ID:gigikiri,项目名称:masjid-l3,代码行数:7,代码来源:transaction.php

示例2: delete

 /**
  * Deletes a blog post and all
  * the associated comments.
  *
  * @return bool
  */
 public function delete()
 {
     // Delete the comments
     $this->comments()->delete();
     // Delete the blog post
     return parent::delete();
 }
开发者ID:bailey9005,项目名称:Laravel-For-Landing-Pages,代码行数:13,代码来源:Post.php

示例3: delete

 public function delete()
 {
     $this->tabs()->delete();
     $this->fields()->delete();
     $this->requests()->delete();
     return parent::delete();
 }
开发者ID:soarmorrow,项目名称:refercom,代码行数:7,代码来源:Forms.php

示例4: delete

 public function delete()
 {
     // delete all related blocks
     $this->blocks()->delete();
     // delete the grid
     return parent::delete();
 }
开发者ID:basdog22,项目名称:laracms,代码行数:7,代码来源:Grids.php

示例5: delete

 public function delete()
 {
     foreach ($this->comments as $comment) {
         $comment->delete();
     }
     return parent::delete();
 }
开发者ID:Neal-liu,项目名称:neal-liu.github.io,代码行数:7,代码来源:Post.php

示例6: delete

 public function delete()
 {
     if (File::exists($this->getPath())) {
         File::deleteDirectory($this->getPath());
     }
     parent::delete();
 }
开发者ID:vanderlin,项目名称:halp,代码行数:7,代码来源:Version.php

示例7: delete

 /**
  * Delete Category & related Albums
  *
  * @return bool
  */
 public function delete()
 {
     $albums = $this->albums;
     foreach ($albums as $album) {
         $album->delete();
     }
     return parent::delete();
 }
开发者ID:developeman,项目名称:Laravel-Image-Archive,代码行数:13,代码来源:Category.php

示例8: delete

 /**
  * Delete Album & related Images
  *
  * @return bool
  */
 public function delete()
 {
     $images = $this->images;
     foreach ($images as $image) {
         $image->delete();
     }
     return parent::delete();
 }
开发者ID:developeman,项目名称:Laravel-Image-Archive,代码行数:13,代码来源:Album.php

示例9: delete

 public function delete()
 {
     $id = $this->id;
     if (!parent::delete()) {
         return false;
     }
     return !$this->find($id) ? true : false;
 }
开发者ID:Aranjedeath,项目名称:Laravel_Starter,代码行数:8,代码来源:Todos.php

示例10: delete

 public function delete()
 {
     foreach ($this->todos as $todo) {
         $todo->delete();
     }
     $user->organizations()->detach();
     parent::delete();
 }
开发者ID:illuminate3,项目名称:Multitenant-Apps-in-Laravel,代码行数:8,代码来源:User.php

示例11: delete

 public function delete()
 {
     // Borra todos los comentarios
     foreach ($this->downloads as $download) {
         $download->delete();
     }
     // Borramos el Post
     return parent::delete();
 }
开发者ID:wachap,项目名称:incotec-cms,代码行数:9,代码来源:Course.php

示例12: delete

 public function delete()
 {
     // Delete the details
     $this->seeker()->delete();
     // Delete the details
     $this->writer()->delete();
     // Delete the request
     return parent::delete();
 }
开发者ID:soarmorrow,项目名称:refercom,代码行数:9,代码来源:FormRequests.php

示例13: delete

 public function delete()
 {
     // Borra todos los comentarios
     foreach ($this->programmes as $programme) {
         $programme->delete();
     }
     // Borramos el Post
     return parent::delete();
 }
开发者ID:wachap,项目名称:incotec-cms,代码行数:9,代码来源:Activity.php

示例14: delete

 public function delete()
 {
     // Borra todos los comentarios
     foreach ($this->photos as $photo) {
         \File::delete($photo->image_url);
         $photo->delete();
     }
     // Borramos el Post
     return parent::delete();
 }
开发者ID:wachap,项目名称:incotec-cms,代码行数:10,代码来源:Gallery.php

示例15: delete

 public function delete()
 {
     if ($this->id === $this->currentUser()->id) {
         return false;
     }
     $id = $this->id;
     Activity::log(array('contentID' => $this->id, 'contentType' => 'account_deleted', 'description' => $this->id, 'details' => '', 'updated' => $this->currentUser()->id ? true : false));
     Event::fire('controller.user.delete', array($this));
     if (!parent::delete()) {
         return false;
     }
     return !$this->find($id) ? true : false;
 }
开发者ID:Askedio,项目名称:LaravelCP-v1,代码行数:13,代码来源:User.php


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