Roland Barkóczi
How should I define the exportAction exporter class in order to export hasMany relation?
Hello awcodes,
thanks, finally I imploded the prices into one field separated by a pipe, and import back this way.
The main problem here, that the getColumns function is static, and it's content can't be change based on options.
5 replies
How to manage ManyToMany relation in TableBuilder and FormBuilder?
The default() just inject the $record to the callback function. Of course the 'price_1' still not exists therefore it cannot display anything, but in the default() function I can query the necessary data
47 replies
How to manage ManyToMany relation in TableBuilder and FormBuilder?
yeah, thats the problem. I can query the price if I iterate through the pricelists. My first idea was using the formatStateUsing() but if in case I add a non-existing or empty attribute to the TextColumn::make('xxxx') it shows nothing, and even the formatStateUsing is not called
47 replies
How to manage ManyToMany relation in TableBuilder and FormBuilder?
No, because the pivot table connects only these two tables. I can't see any polymorphic behaviour what is described here:
https://laravel.com/docs/11.x/eloquent-relationships#many-to-many-polymorphic-relations
47 replies
How to manage ManyToMany relation in TableBuilder and FormBuilder?
Hello Awcodes,
I think this is a pure many to many relation:
Product -> ProductPrice (Pivot) <- PriceList
I modified the Product model, and added:
also the Pricelist model:
Question still open: how can I implement The following table:
47 replies