mercredi 29 mars 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



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2nuTNgJ
via IFTTT

Aucun commentaire:

Enregistrer un commentaire