29 lines
766 B
PHP
29 lines
766 B
PHP
<?php
|
|
|
|
namespace App\Services\Admin\Sms;
|
|
|
|
use App\Repositories\Admin\Sms\AdminSmsBatchRepository;
|
|
use Illuminate\Contracts\Pagination\LengthAwarePaginator;
|
|
|
|
final class AdminSmsLogService
|
|
{
|
|
public function __construct(
|
|
private readonly AdminSmsBatchRepository $repo,
|
|
) {}
|
|
|
|
public function paginateBatches(array $filters, int $perPage = 30): LengthAwarePaginator
|
|
{
|
|
return $this->repo->paginateBatches($filters, $perPage);
|
|
}
|
|
|
|
public function getBatch(int $batchId): ?object
|
|
{
|
|
return $this->repo->findBatch($batchId);
|
|
}
|
|
|
|
public function paginateItems(int $batchId, array $filters, int $perPage = 50): LengthAwarePaginator
|
|
{
|
|
return $this->repo->paginateItems($batchId, $filters, $perPage);
|
|
}
|
|
}
|