文档是这么说的
// 查询评论超过3个的文章
$list = Article::has('comments','>',3)->select();
// 查询评论状态正常的文章
$list = Article::hasWhere('comments',['status'=>1])->select();
('comments',['status'=>1])评论状态为1,如果我要状态<5,要怎么写呢?
文档是这么说的
// 查询评论超过3个的文章
$list = Article::has('comments','>',3)->select();
// 查询评论状态正常的文章
$list = Article::hasWhere('comments',['status'=>1])->select();
('comments',['status'=>1])评论状态为1,如果我要状态<5,要怎么写呢?
$list = Article::hasWhere('comments',['status'=>1])->select();
('comments',['status'=>1]