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 ⭐️
PHP attendize-alternativedoor-managementevent-check-inevent-managementevent-registrationevent-ticketingeventbrite-alternativeeventslaravelopen-sourcephpreactself-hostedsell-ticketssell-tickets-onlineticket-sellingticketing-systemtickettailor-alternativetito-alternative
<?php
namespace HiEvents\Services\Application\Handlers\Attendee;
use HiEvents\DomainObjects\AttendeeCheckInDomainObject;
use HiEvents\DomainObjects\EventOccurrenceDomainObject;
use HiEvents\DomainObjects\OrderDomainObject;
use HiEvents\Http\DTO\QueryParamsDTO;
use HiEvents\Repository\Eloquent\Value\Relationship;
use HiEvents\Repository\Interfaces\AttendeeRepositoryInterface;
use Illuminate\Pagination\LengthAwarePaginator;
class GetAttendeesHandler
{
public function __construct(
private readonly AttendeeRepositoryInterface $attendeeRepository,
) {}
public function handle(int $eventId, QueryParamsDTO $queryParams): LengthAwarePaginator
{
return $this->attendeeRepository
->loadRelation(new Relationship(
domainObject: OrderDomainObject::class,
name: 'order'
))
->loadRelation(new Relationship(
domainObject: AttendeeCheckInDomainObject::class,
name: 'check_ins'
))
->loadRelation(new Relationship(
domainObject: EventOccurrenceDomainObject::class,
name: 'event_occurrence'
))
->findByEventId($eventId, $queryParams);
}
}