Answers for "how to get latest data from table in sql laravel"

PHP
1

how get the latest data in database in laravel

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

$last2 = DB::table('items')->orderBy('id', 'DESC')->first();
Posted by: Guest on April-07-2021

Code answers related to "how to get latest data from table in sql laravel"

Browse Popular Code Answers by Language