ORM远程一对多

例如用户有很多文章,某个国家有很多用户,那么某个国家有很多文章。

国家模型

public function posts(){
  return $this->hasManyThrough(最终模型,中间模型,国家id,用户id);
}

首页 我的博客
粤ICP备17103704号