基于存在的关联查询不支持跨库吗?
post 表里关联 comments ,两个表位于不同数据库,基于存在的关联查找报错
$posts = App\Post::has('comments')->get();
推荐文章: