How should I define the exportAction exporter class in order to export hasMany relation?
Use case: - I have a Product model, product has many prices.
public function prices(): HasMany { return $this->hasMany(ProductPrice::class, 'product_id'); }
public function prices(): HasMany { return $this->hasMany(ProductPrice::class, 'product_id'); }
I would like to export these prices in csv/excel format. Ideally add these values in separate columns: SKU | PRODUCT_NAME | ..... | Price 1 | Price 2 |