标签关系
This commit is contained in:
@@ -144,8 +144,8 @@ class CustomerController
|
||||
}
|
||||
|
||||
|
||||
// 执行分页查询
|
||||
$query = Customer::where($where)
|
||||
// 执行分页查询 //关联标签tags //关联标签及分组tags.group
|
||||
$query = Customer::with('tags')->where($where)
|
||||
->orderBy('id', 'desc');
|
||||
if (!Util::isEmpty($keyword)) {
|
||||
$query->where(function ($query) use ($keyword) {
|
||||
@@ -210,7 +210,7 @@ class CustomerController
|
||||
return Util::fail([], 'id' . trans('not_null'));
|
||||
}
|
||||
|
||||
$res = Customer::select('id', 'user_id', 'grade', 'channel_id', 'car_type_id', 'country_id', 'magnitude', 'email', 'phone', 'WhatsApp', 'contacts', 'describe', 'address', 'lat', 'lng', 'follow_next', 'follow_remark', 'sex')
|
||||
$res = Customer::with('tags')->select('id', 'user_id', 'grade', 'channel_id', 'car_type_id', 'country_id', 'magnitude', 'email', 'phone', 'WhatsApp', 'contacts', 'describe', 'address', 'lat', 'lng', 'follow_next', 'follow_remark', 'sex')
|
||||
->where('id', $id)
|
||||
->first();
|
||||
if ($res) {
|
||||
|
||||
Reference in New Issue
Block a user