Best approach to inject data before Import #3514
-
I'm working on a Cart Item importing feature. I'm able to import product + qty with success but now I want pass the user_id logged and other kind of data. The CSV file:
The Model's table:
Which is the best approach to inject data before Import like user_id and seller_id? Right now I'm trying use the construct to pass data to my Import model like this: Is there a "better" way to try do this? |
Beta Was this translation helpful? Give feedback.
Answered by
patrickbrouwers
Feb 1, 2022
Replies: 1 comment
-
Via the constructor is the correct way yes |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
deniscsz
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Via the constructor is the correct way yes