$builder->where('name', 'like', "%{$q}%") ->orWhere('email', 'like', "%{$q}%") ->orWhere('body', 'like', "%{$q}%") ->orWhereHas('post', fn ($p) => $p->where('title', 'like', "%{$q}%")); }); } if (in_array($filters['status'], [ BlogComment::STATUS_PENDING, BlogComment::STATUS_APPROVED, BlogComment::STATUS_REJECTED, ], true)) { $query->where('status', $filters['status']); } /** @var LengthAwarePaginator $comments */ $comments = $query->paginate(20); $comments->withQueryString(); $stats = $this->commentStats(); return [ 'stats' => $stats,
$builder->where('name', 'like', "%{$q}%") ->orWhere('email', 'like', "%{$q}%") ->orWhere('body', 'like', "%{$q}%") ->orWhereHas('post', fn ($p) => $p->where('title', 'like', "%{$q}%")); }); } if (in_array($filters['status'], [ BlogComment::STATUS_PENDING, BlogComment::STATUS_APPROVED, BlogComment::STATUS_REJECTED, ], true)) { $query->where('status', $filters['status']); } /** @var LengthAwarePaginator $comments */ $comments = $query->paginate(20); $comments->withQueryString(); $stats = $this->commentStats(); return [ 'stats' => $stats,
$builder->where('name', 'like', "%{$q}%") ->orWhere('email', 'like', "%{$q}%") ->orWhere('body', 'like', "%{$q}%") ->orWhereHas('post', fn ($p) => $p->where('title', 'like', "%{$q}%")); }); } if (in_array($filters['status'], [ BlogComment::STATUS_PENDING, BlogComment::STATUS_APPROVED, BlogComment::STATUS_REJECTED, ], true)) { $query->where('status', $filters['status']); } /** @var LengthAwarePaginator $comments */ $comments = $query->paginate(20); $comments->withQueryString(); $stats = $this->commentStats(); return [ 'stats' => $stats,
$builder->where('name', 'like', "%{$q}%") ->orWhere('email', 'like', "%{$q}%") ->orWhere('body', 'like', "%{$q}%") ->orWhereHas('post', fn ($p) => $p->where('title', 'like', "%{$q}%")); }); } if (in_array($filters['status'], [ BlogComment::STATUS_PENDING, BlogComment::STATUS_APPROVED, BlogComment::STATUS_REJECTED, ], true)) { $query->where('status', $filters['status']); } /** @var LengthAwarePaginator $comments */ $comments = $query->paginate(20); $comments->withQueryString(); $stats = $this->commentStats(); return [ 'stats' => $stats,
$builder->where('name', 'like', "%{$q}%") ->orWhere('email', 'like', "%{$q}%") ->orWhere('body', 'like', "%{$q}%") ->orWhereHas('post', fn ($p) => $p->where('title', 'like', "%{$q}%")); }); } if (in_array($filters['status'], [ BlogComment::STATUS_PENDING, BlogComment::STATUS_APPROVED, BlogComment::STATUS_REJECTED, ], true)) { $query->where('status', $filters['status']); } /** @var LengthAwarePaginator $comments */ $comments = $query->paginate(20); $comments->withQueryString(); $stats = $this->commentStats(); return [ 'stats' => $stats,
Comment
(0 comments)
Leave a comment
Your email address will not be published. Required fields are marked *
No comments yet. Be the first to leave a comment.