$this->id, 'roles' => AdminRoleResource::collection($this->whenloaded('roles')), 'username' => $this->username, 'name' => $this->name, 'avatar' => $this->avatar, 'department' => $this->department, 'phone' => $this->phone, 'status' => $this->status, 'is_enable' => $this->is_enable, 'bases' => AgriculturalBaseResource::collection($this->whenloaded('bases')), ]; } }