Browse Source

用户列表返回部门名称字段

kely 6 months ago
parent
commit
111273dd2e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/Http/Resources/API/UserSimpleResource.php

+ 1 - 1
app/Http/Resources/API/UserSimpleResource.php

@@ -26,7 +26,7 @@ class UserSimpleResource  extends JsonResource
             'created_at' => (string)$this->created_at,
             'created_by' => new UserProfileResource($this->createdBy),
             'company' => $this->company_id,
-            'department' =>$this->department_id,
+            'department' =>new DepartmentResource($this->department),
             'role' => $this->role_id,
             'role_name' => $this->role->name,
             'status' =>$this->status,