first() and update() row in one query
How can I do this in one line?
$account = Account::where('user_id', $user->id)->first();
$account->update(['balance' => $account->balance + 25]);
Please sign in or create an account to participate in this conversation.
There's no shortage of content at Laracasts. In fact, you could watch nonstop
for days upon days, and still not see everything!