products_id)->get(); $imagePaths = []; if (!empty($images)) { foreach ($images as $imageItem) { $path = asset('public/' . $imageItem['images']); $imagePaths[] = $path; } } return [ 'id' => $this->id, 'products_id' => $this->products_id, 'product_images' => $imagePaths, 'presentation' => Product::find($this->products_id) ? Product::where('id',$this->products_id)->value('presentation') : null, 'fact_sheet' => Product::find($this->products_id) ? Product::where('id',$this->products_id)->value('fact_sheet') : null, '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, ]; } }