lundi 22 juin 2020

Update only last record in laravel table

I want to get the last record from the colume, then update it...just the last record

i have tried like this but its not working

DB::table('sales')->where('id', $salesid)->pluck('debt')->last()->update([

'debt'. => 34

]);



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire