Browse Source

返回部门的管理员

kely 11 months ago
parent
commit
5c716f60d0
1 changed files with 1 additions and 0 deletions
  1. 1 0
      app/Http/Resources/API/DepartmentResource.php

+ 1 - 0
app/Http/Resources/API/DepartmentResource.php

@@ -19,6 +19,7 @@ class DepartmentResource extends JsonResource
           'id' => $this->id,
           'id' => $this->id,
           'name' => $this->name,
           'name' => $this->name,
           'parent_id'  => $this->parent_id,
           'parent_id'  => $this->parent_id,
+          'manager_id' => $this->manager_id,
           'children' => $this->when($this->children->isNotEmpty(),function (){
           'children' => $this->when($this->children->isNotEmpty(),function (){
                 return $this->children->map(function ($child){
                 return $this->children->map(function ($child){
                     return new DepartmentResource($child);
                     return new DepartmentResource($child);