private getPosts ( ) : [type] | ||
return | [type] |
private function getPosts()
{
$collection = collect();
$messages = $this->message->with(['caseOverview' => function ($query) {
$query->where('status', '!=', '2')->where('origin', 'Facebook post');
}])->where('fb_post_id', '!=', '')->where('fb_reply_id', '')->where('fb_private_id', '')->get();
$publishments = $this->publishment->facebookPosts();
foreach ($messages as $key => $message) {
$collection->push($message);
}
foreach ($publishments as $key => $publishment) {
$collection->push($publishment);
}
return $collection;
}