/** * Get comments by post id * * @param $postId * @return mixed */ public function findByPostId($postId) { $data = ['post_id' => $postId]; return $this->comment->search($data); }