Question : laravel get last record
Answered by : kevin-x8phzry21f6x
Model::latest()->first();
Source : | Last Update : Wed, 13 May 20
Question : laravel latest()
Answered by : dominik-balogh
$price = Prices::where('product_id', $product->id) ->latest('id') // default it is based on 'created_at' ->first();
Source : | Last Update : Tue, 12 Jul 22
Question : laravel get latest
Answered by : fahim-foysal-rabby
$data = Model::query()->latest()->get();
Source : | Last Update : Sat, 31 Jul 21