public function whenPostWasDeleted(PostWasDeleted $event) { $this->removePost($event->post); $discussion = $event->post->discussion; if ($discussion && $discussion->posts()->count() === 0) { $discussion->delete(); } }