47 lines
2.0 KiB
PHP
47 lines
2.0 KiB
PHP
<?php
|
|
|
|
namespace App\Http\Resources;
|
|
|
|
use App\Models\Product;
|
|
use Illuminate\Http\Resources\Json\JsonResource;
|
|
|
|
class FractionalRealEstateResource extends JsonResource
|
|
{
|
|
/**
|
|
* Transform the resource into an array.
|
|
*
|
|
* @param \Illuminate\Http\Request $request
|
|
* @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
|
|
*/
|
|
public function toArray($request)
|
|
{
|
|
return [
|
|
'id' => $this->id,
|
|
'products_id' => $this->products_id,
|
|
'presentation' => Product::find($this->products_id) == null ? '' : Product::find($this->products_id)->value('presentation'),
|
|
'fact_sheet' => Product::find($this->products_id) == null ? '' : Product::find($this->products_id)->value('fact_sheet'),
|
|
'companies_id' => $this->companies_id,
|
|
'slug' => $this->slug,
|
|
'property_name_and_location' => $this->property_name_and_location,
|
|
'property_description' => $this->property_description,
|
|
'property_grade' => $this->property_grade,
|
|
'asset_type' => $this->asset_type,
|
|
'tenant' => $this->tenant,
|
|
'deal_size_in_crore' => $this->deal_size_in_crore,
|
|
'coupon_rate_on_ccd' => $this->coupon_rate_on_ccd,
|
|
'rental_escalation' => $this->rental_escalation,
|
|
'capital_appreciation' => $this->capital_appreciation,
|
|
'expected_irr' => $this->expected_irr,
|
|
'cagr' => $this->cagr,
|
|
'minimum_investment' => $this->minimum_investment,
|
|
'minimum_investment_lockin' => $this->minimum_investment_lockin,
|
|
'tenant_lease_term' => $this->tenant_lease_term,
|
|
'tenant_lock_in' => $this->tenant_lock_in,
|
|
'tenant_security_deposit' => $this->tenant_security_deposit,
|
|
'annual_management_fee' => $this->annual_management_fee,
|
|
'performance_fees' => $this->performance_fees,
|
|
'hurdle_rate' => $this->hurdle_rate,
|
|
];
|
|
}
|
|
}
|