how get the latest data in database in laravel

Solutions on MaxInterview for how get the latest data in database in laravel by the best coders in the world

showing results for - "how get the latest data in database in laravel"
Rebeca
26 Mar 2017
1$last = DB::table('items')->latest()->first();
2
3$last2 = DB::table('items')->orderBy('id', 'DESC')->first();