Answer the question
In order to leave comments, you need to log in
Is there a convenient way to update relational models in Laravel?
Like how do we update one model:
$someModel->update($request->all());
not just one, but, say, two, which are in a one-to-one relationship, or some other?
I looked at the docks - I did not find anything on this topic.
Those. Let's say I want to update some data in a User and in a WishList which belongsTo User with a single PATCH request - is there a shorthand way to do this in Eloquent?
Thank you.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question