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
]);