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\Http\Actions;
use HiEvents\DomainObjects\EventDomainObject;
use HiEvents\Enterprise\BoxOffice\Resources\BoxOfficeWithPinResource;
use HiEvents\Enterprise\BoxOffice\Services\Application\Handlers\ResetBoxOfficePinHandler;
use HiEvents\Exceptions\ResourceNotFoundException;
use Illuminate\Http\JsonResponse;
class ResetBoxOfficePinAction extends BaseBoxOfficeAction
{
public function __construct(
private readonly ResetBoxOfficePinHandler $handler,
) {}
/**
* @throws ResourceNotFoundException
*/
public function __invoke(int $eventId, int $boxOfficeId): JsonResponse
{
$this->isActionAuthorized($eventId, EventDomainObject::class);
$this->assertBoxOfficeEnabled();
return $this->resourceResponse(
resource: BoxOfficeWithPinResource::class,
data: $this->handler->handle($eventId, $boxOfficeId),
);
}
}