Closed mepoohsta closed 6 years ago
As of now I think you need two attributes for that:
How would you do with a normal database schema? Probably two columns, right?
Yea, you are right. Thank you.
But how to store multiple money-currency values in one model? If I store multiple money values, how to bind one money to currency and another money to another currency? Maybe you can help.
Create your migration for storing that value type: https://github.com/rinvex/attributes/blob/master/database/migrations/2017_01_19_040622_create_attribute_integer_values_table.php
Create the model for that value: https://github.com/rinvex/attributes/blob/master/src/Models/Type/Integer.php
Add it to map: https://github.com/rinvex/attributes/blob/master/src/Providers/AttributesServiceProvider.php#L57-L63
This should work :)
Something like this
Value + currency