Skip to content

Open-source event management and ticket selling platform — perfect for concerts, conferences, and everything in between 🎟️ If you find this project helpful, please consider giving us a star ⭐️

765 B
Raw Blame
<?php

namespace HiEvents\Services\Application\Handlers\Admin;

use HiEvents\Repository\Interfaces\AccountDeletionRequestRepositoryInterface;
use HiEvents\Services\Application\Handlers\Admin\DTO\GetAllAccountDeletionRequestsDTO;
use Illuminate\Contracts\Pagination\LengthAwarePaginator;

class GetAllAccountDeletionRequestsHandler
{
    public function __construct(
        private readonly AccountDeletionRequestRepositoryInterface $deletionRequestRepository,
    ) {}

    public function handle(GetAllAccountDeletionRequestsDTO $dto): LengthAwarePaginator
    {
        return $this->deletionRequestRepository->getAllRequestsWithAccounts(
            search: $dto->search,
            status: $dto->status,
            perPage: $dto->perPage,
        );
    }
}