getting last record \id laravel code example Example: laravel get last record return DB::table('files')->order_by('upload_time', 'desc')->first();