public function restore() { parent::restore(); // TODO: Change the autogenerated stub if ($this->thread->getLatestMessageAttribute()->user_id != $this->user_id || $this->thread->getLatestMessageAttribute()->type == 'notification') { Event::fire(new NewMessage($this)); } }