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

]);



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

Aucun commentaire:

Enregistrer un commentaire