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\Enterprise\BoxOffice\Services\Application\Handlers\Public;
use HiEvents\DomainObjects\AttendeeCheckInDomainObject;
use HiEvents\DomainObjects\AttendeeDomainObject;
use HiEvents\DomainObjects\BoxOfficeDomainObject;
use HiEvents\DomainObjects\OrderItemDomainObject;
use HiEvents\Http\DTO\QueryParamsDTO;
use HiEvents\Repository\Eloquent\Value\Relationship;
use HiEvents\Repository\Interfaces\OrderRepositoryInterface;
use Illuminate\Contracts\Pagination\LengthAwarePaginator;
class GetBoxOfficeOrdersPublicHandler
{
public function __construct(
private readonly OrderRepositoryInterface $orderRepository,
) {}
public function handle(BoxOfficeDomainObject $boxOffice, QueryParamsDTO $params): LengthAwarePaginator
{
return $this->orderRepository
->loadRelation(OrderItemDomainObject::class)
->loadRelation(new Relationship(
domainObject: AttendeeDomainObject::class,
nested: [new Relationship(domainObject: AttendeeCheckInDomainObject::class, name: 'check_ins')],
))
->findByBoxOfficeId($boxOffice->getId(), $params);
}
}