更新字段

This commit is contained in:
mkm 2023-11-13 17:47:54 +08:00
parent 576e11a52c
commit 6c44769642
2 changed files with 1 additions and 2 deletions

View File

@ -57,7 +57,6 @@ class CustomContactsLists extends BaseAdminDataLists implements ListsSearchInter
return CustomContacts::where($this->searchWhere) return CustomContacts::where($this->searchWhere)
->field(['id', 'custom_id', 'name', 'position', 'phone', 'telephone', 'email', 'notes', 'annex', 'status']) ->field(['id', 'custom_id', 'name', 'position', 'phone', 'telephone', 'email', 'notes', 'annex', 'status'])
->limit($this->limitOffset, $this->limitLength) ->limit($this->limitOffset, $this->limitLength)
->with(['customName'])
->order(['id' => 'desc']) ->order(['id' => 'desc'])
->select() ->select()
->toArray(); ->toArray();

View File

@ -117,6 +117,6 @@ class CustomContactsLogic extends BaseLogic
*/ */
public static function detail($params): array public static function detail($params): array
{ {
return CustomContacts::findOrEmpty($params['id'])->toArray(); return CustomContacts::with(['customName'])->findOrEmpty($params['id'])->toArray();
} }
} }