企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
join为普通的多表联查 例子: ![](https://box.kancloud.cn/e9b5244a685daf00a7d2a26bff41b468_1397x72.png) ~~~ $query = Article::find(); $query->->join('left join','article_type','article_type.id=article.article_type') ->select('article.title,article.content,article.author,article.create_at,article.id,article_type.name as articleType') ->asArray(); ~~~ `join()`有三个参数: ~~~ type left join | right join | inner join table_name 表名称 on 关联ID(a.id=b.id) ~~~