I am trying to update the relationship of a one-to-many relationship in Laravel. Unfortunately I couldn\'t find any documentation for it. Can anyone help me?
This is wha
Taylor Otwell's official answer is the following:
$account = Account::find(99); User::find(1)->account()->associate($account)->save();
I couldn't find the associate() method in the official docs. So if someone else is looking for a solution to this. Here you go!