Rubenwouters\CrmLauncher\Updates\UpdateAllCases::getComments PHP Method

getComments() private method

private getComments ( )
    private function getComments()
    {
        $collection = collect();
        $messages = $this->message->where('fb_post_id', '!=', '')->get();
        $answers = $this->answer->where('fb_post_id', '!=', '')->get();
        $reactions = $this->reaction->where('fb_post_id', '!=', '')->get();
        foreach ($messages as $key => $message) {
            $collection->push($message);
        }
        foreach ($answers as $key => $answer) {
            $collection->push($answer);
        }
        foreach ($reactions as $key => $reaction) {
            $collection->push($reaction);
        }
        return $collection;
    }