How can I update an existing Eloquent relationship in Laravel 4?

后端 未结 4 686
情深已故
情深已故 2021-02-07 13:08

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

4条回答
  •  滥情空心
    2021-02-07 14:11

    **

    Try

    $user = User::find();
    $account = Account::find()->user()->save($user)
    

    My apologies, I didn't understand what was trying to be accomplished.

提交回复
热议问题