Wednesday, March 29, 2017

Return Collection after update()?

Using Raw, how to return collection of updated row?

For example:

$updated = DB::table('users')->where('id', 1)->update(['votes' => 123]);

I was expecting dd($updated) to return updated row of collection but it returned 1.

 should return 123



via I'll-Be-Back

Advertisement