get last row id in laravel 5 code example
Example 1: Get last id in laravel
$last3 = DB::table('items')->latest('id')->first();
Example 2: laravel get last 5 records
Dogs::latest()->take(5)->get();
$last3 = DB::table('items')->latest('id')->first();
Dogs::latest()->take(5)->get();