|
@@ -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);
|