修改查询教师错复

This commit is contained in:
小松树 committed 2019-03-04 10:43:19 +08:00
1 parent f375328cb6
commit a1e6dc24dc
8 files changed
+16 -9

No files matched your search

+7
View File
@@ -364,6 +364,13 @@ class Index extends Base
// 如果有数据则查询教师信息
$list = Teacher::field('id,xingming,danwei,shengri,sex')
->whereOr('xingming|quanpin|shoupin','like','%'.$str.'%')
->with(
[
'jsDanwei'=>function($query){
$query->field('id,jiancheng');
},
]
)
->append(['age'])
->all();
return json($list);