How To Fetch Last Record From Table In Laravel

[Solved] How To Fetch Last Record From Table In Laravel | Php - Code Explorer | yomemimo.com
Question : how get last record in laravel query

Answered by : kevin-x8phzry21f6x

Model::latest()->first();

Source : | Last Update : Wed, 13 May 20

Question : How to fetch last record from table in Laravel?

Answered by : awful-albatross-qbpi980y0bzo

$last = DB::table('items')->latest()->first();

Source : https://www.itsolutionstuff.com/post/how-to-get-last-record-of-database-table-in-laravelexample.html | Last Update : Sat, 18 Jul 20

Answers related to how to fetch last record from table in laravel

Code Explorer Popular Question For Php