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)->value('presentation'), 'fact_sheet' => Product::find($this->products_id)->value('fact_sheet'), 'company' => $this->company, 'slug' => $this->slug, 'asset_class' => $this->asset_class, 'underlying_asset' => $this->underlying_asset, 'sector' => $this->sector, 'mobility_platform' => $this->mobility_platform, 'total_deal_size' => $this->total_deal_size, 'minimum_investment' => $this->minimum_investment, 'tenure' => $this->tenure, 'payout_frequency' => $this->payout_frequency, 'pre_tax_return' => $this->pre_tax_return, 'minimum_investment_in_int' => $this->minimum_investment_in_int, ]; } }