thinkphp5.1关联模型条件查询
在模型内使用一对一或者一对多关联并对被关联模型进行条件查询
public function getcover(){
return $this->hasMany("Comments","cid","id")->where("status", "=", "1");
}
在模型内使用一对一或者一对多关联并对被关联模型进行条件查询
public function getcover(){
return $this->hasMany("Comments","cid","id")->where("status", "=", "1");
}
asfasfs