laravel query get uniquest id last record in array code example Example: get the last saved row in a table laravel $last = DB::table('items;)->latest()->first();