Skip to content
This repository was archived by the owner on Sep 15, 2023. It is now read-only.

Save Additional Data #7

Open
mobi-market-dev opened this issue Jun 8, 2020 · 1 comment
Open

Save Additional Data #7

mobi-market-dev opened this issue Jun 8, 2020 · 1 comment

Comments

@mobi-market-dev
Copy link

Hi,

This tool is great. it works as expected with simple key value options; however is it possible to store additional information with the request?

I have a belongsToManyThrough in which i am using this tool to populate a BelongsToMany field. The issue i am having is that i have a singular table, say attributes, that stores the 2 primary keys and a third enum field. An example is product categories, in the attributes table i store the product_id, category_id and type (enum, value = 'category')

When doing this with this package i find that the type field always defaults to the default type - i need to be able to set the type for each multiselect, of which there are many. Is this possible?

@mobi-market-dev
Copy link
Author

created a PR for this functionality.

#8

Works fine locally. Basically set an array of additional relationship data, pass it in as second param to the attach() function

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant