public function transmission(Message $message) { if (!$this->pusher) { return false; } $sender = $message->sender->toArray(); $messageArray = $message->toArray(); $messageArray['sender'] = $sender; $this->dispatch(new Webcast($messageArray)); }
public function deleteMessages($conversationId) { $delete = Message::where('conversation_id', $conversationId)->delete(); if ($delete) { return true; } return false; }