芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/reginaeigbe.com/folder/admin/tmp/app/Repositories/Admin/CommentRepository.php
model = $comment; } public function paginateSearchResult($search, array $sort = []) { $query = $this->model->with('post')->newQuery(); if ($search) { $query->orWhere('comment_content', 'like', "%$search%") ->orWhere('comment_author_email', 'like', "%$search%") ->orWhere('comment_author_name', 'like', "%$search%"); } // sort comment if($sort['column']){ $query->orderBy($sort['column'], $sort['order']); } return $query->paginate(30); } /** * Comment approved */ public function approved(Comment $comment): void { $comment->update(['is_approved' => '1']); } /** * Comment unApproved */ public function unApproved(Comment $comment): void { $comment->update(['is_approved' => '0']); } }