You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have 2 models, Product and Vendor. when I want to create a new product, I need to embed existing vendor to my new product. so far, this is what I have done:
so, what is the correct way to embed existing document into newly created document?
PS: I also tried to save the vendor just like the documentation said, that is:
This discussion was converted from issue #2232 on April 30, 2021 10:00.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have 2 models, Product and Vendor. when I want to create a new product, I need to embed existing vendor to my new product. so far, this is what I have done:
that code resulting the following document
so, what is the correct way to embed existing document into newly created document?
PS: I also tried to save the vendor just like the documentation said, that is:
$product->vendor()->save($vendor)
Beta Was this translation helpful? Give feedback.
All reactions