Laravel | Updating the Logged-In User - save() vs update()

后端 未结 0 618
陌清茗
陌清茗 2020-12-06 17:47

I want to update a field of the logged-in user.

In my controller, this works:

Auth::user()->the_field = $theField;
Auth::user()->save();
<         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题