예제 #1
0
 public function delete()
 {
     foreach ($this->replies as $reply) {
         $reply->delete();
     }
     Content::where('id', $this->content_id)->decrement('comments_count');
     return parent::delete();
 }
예제 #2
0
파일: Entry.php 프로젝트: vegax87/Strimoid
 public function delete()
 {
     foreach ($this->replies as $reply) {
         $reply->delete();
     }
     $this->notifications()->delete();
     return parent::delete();
 }
예제 #3
0
 public function __construct($attributes = [])
 {
     static::deleted(function (Content $content) {
         Notification::where('content_id', $this->getKey())->delete();
         if (!$content->trashed()) {
             foreach ($this->comments() as $comment) {
                 $comment->delete();
             }
         }
     });
     parent::__construct($attributes);
 }
예제 #4
0
파일: Group.php 프로젝트: vegax87/Strimoid
 public function delete()
 {
     $this->deleteAvatar();
     $this->deleteStyle();
     return parent::delete();
 }
예제 #5
0
 public function delete()
 {
     Content::where('id', $this->content_id)->decrement('related_count');
     return parent::delete();
 }