'comment_id = :comment_id: AND user_id = :user_id:', 'bind' => ['comment_id' => $commentId, 'user_id' => $userId], ]); } /** * @param int $userId * @return ResultsetInterface|Resultset|CommentLikeModel[] */ public function findByUserId($userId) { return CommentLikeModel::query() ->where('user_id = :user_id:', ['user_id' => $userId]) ->execute(); } }