how to get last record from a selected query in laravel code example Example: get the last saved row in a table laravel $last = DB::table('items;)->latest()->first();