Answers for "how get the latest data in database in 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 get the latest data in database in laravel"

Browse Popular Code Answers by Language