attach properties to products
I want to assign properties to the products:
Product Model:
Product Table
products
fields:
I have registered PropertiesRelationManager::class on the ProductRequest
Property Model:
Property Table properties
fields:
PropertyValue Model:
Table property_values
with the followings fields:
ProductProperty Model:
ProductProperty Table product_properties
fields:
PropertiesRelationManager:
When I save, I get: Array to string conversion
I guess that this happens because I declared multiple() on Select::make('property_value_id') and what I select is passed as array and my field property_value_id
accepts an integer.
For each selected value in this Select::make('property_value_id') I want to add a record in the product_properties table not a single record with all the values as if the property_value_id would be of type json.
Thanks for your time!0 Replies