diff --git a/src/Models/Archive.php b/src/Models/Archive.php index ed06cc7..f642e14 100644 --- a/src/Models/Archive.php +++ b/src/Models/Archive.php @@ -88,16 +88,20 @@ private function archive(string $archive, array $arguments, bool $kopf = true) try { if($kopf) { - $result->push(DB::connection('bios2000')->table($tableName) + $item = DB::connection('bios2000')->table($tableName) ->where($arguments) ->orderBy('VERSION', 'desc') - ->get()->all()); + ->get()->all(); } else { - $result->push(DB::connection('bios2000')->table($tableName) + $item = DB::connection('bios2000')->table($tableName) ->where('POSITIONS_NR', '!=', null) ->where($arguments) ->orderBy('VERSION', 'desc') - ->get()->all()); + ->get()->all(); + } + + if (count($item) > 0) { + $result->push($item); } } catch (Exception $e) {