Files
pterodactyl-panel/app/Services/Backups/BackupListService.php
T
6c0413e39b Start 2.0 development
Co-authored-by: Anthony <anthony@infraly.co>
Co-authored-by: Sky Mulley <daniel.mulley@outlook.com>
2026-10-05 18:10:18 -04:00

24 lines
564 B
PHP

<?php
declare(strict_types=1);
namespace Pterodactyl\Services\Backups;
use Illuminate\Contracts\Pagination\LengthAwarePaginator;
use Pterodactyl\Models\Backup;
use Pterodactyl\Models\Server;
class BackupListService
{
/**
* @return array{backups: LengthAwarePaginator<int, Backup>, backup_count: int}
*/
public function handle(Server $server, int $perPage): array
{
return [
'backups' => $server->backups()->paginate($perPage),
'backup_count' => $server->backups()->nonFailed()->count(),
];
}
}