|
@@ -34,11 +34,22 @@ class AssetResource extends JsonResource
|
|
'requirement_total' => $this->total_requirements_count,
|
|
'requirement_total' => $this->total_requirements_count,
|
|
'plan_total' => $this->total_plans_count,
|
|
'plan_total' => $this->total_plans_count,
|
|
'created_at'=> $this->created_at,
|
|
'created_at'=> $this->created_at,
|
|
|
|
+ 'equity_interest'=>$this->equity_interest,
|
|
|
|
+ 'developer' =>$this->developer,
|
|
|
|
+ 'date_completed' =>$this->date_completed,
|
|
|
|
+ 'total_floor_area' => $this->total_floor_area,
|
|
|
|
+ 'contact_person'=>$this->contact_person,
|
|
|
|
+ 'contact_phone'=>$this->contact_phone,
|
|
|
|
+ 'contact_email'=>$this->contact_email,
|
|
|
|
+ 'property'=> $this->property,
|
|
|
|
+ 'building_type_description'=>$this->building_type_description,
|
|
'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 AssetResource($child, $this->level);
|
|
return new AssetResource($child, $this->level);
|
|
})->all();
|
|
})->all();
|
|
}),
|
|
}),
|
|
|
|
+
|
|
|
|
+
|
|
];
|
|
];
|
|
}
|
|
}
|
|
}
|
|
}
|