tweet_id = $tweet->id; $this->tweet_date = strtotime($tweet->tweet_date); $this->team_name = ($tweet->team ? $tweet->team->name : null); $this->team_color = ($tweet->team ? $tweet->team->color : null); $this->player_username = ($tweet->player ? $tweet->player->twitter : null); $this->player_photo = ($tweet->player ? $tweet->player->photo : null); $this->text = $tweet->text; $this->photos = json_decode($tweet->photo); $this->mission = ($tweet->mission ? $tweet->mission->hashtag : null); $this->mission_id = $tweet->mission_id; } /** * Get the channels the event should broadcast on. * * @return Channel|array */ public function broadcastOn() { return ['tweet-queue']; } }