Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
save saves the model, associate is used to save the BelongsTo connection and is called not on the model itself, but on the result of the relation method.
"When updating belongsTo relationships, you can use the associate() method. It will set the foreign key on the associated model." I think associate just makes a selection, and save is already a save procedure in the database.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question