关联查询加上限制条件
$self= SystemAdmin::with(['terminal'=> function (Query $query) {
$query->where('cate_id',2);
}])->select();
$self= SystemAdmin::with(['terminal'=> function (Query $query) {
$query->where('cate_id',2);
}])->select();