更新
This commit is contained in:
parent
358b504718
commit
576e11a52c
@ -57,6 +57,7 @@ class CustomContactsLists extends BaseAdminDataLists implements ListsSearchInter
|
||||
return CustomContacts::where($this->searchWhere)
|
||||
->field(['id', 'custom_id', 'name', 'position', 'phone', 'telephone', 'email', 'notes', 'annex', 'status'])
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->with(['customName'])
|
||||
->order(['id' => 'desc'])
|
||||
->select()
|
||||
->toArray();
|
||||
|
@ -37,9 +37,9 @@ class CustomContacts extends BaseModel
|
||||
* @author likeadmin
|
||||
* @date 2023/11/11 22:56
|
||||
*/
|
||||
public function 关联客户()
|
||||
public function customName()
|
||||
{
|
||||
return $this->hasOne(\app\common\model\custom\Custom::class, 'id', 'custom_id');
|
||||
return $this->hasOne(\app\common\model\custom\Custom::class, 'id', 'custom_id')->bind(['custom_name'=>'name']);
|
||||
}
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user