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\Resources\Question;
use HiEvents\DomainObjects\QuestionDomainObject;
use HiEvents\Resources\BaseResource;
use Illuminate\Http\Request;
/**
* @mixin QuestionDomainObject
*/
class QuestionResourcePublic extends BaseResource
{
public function toArray(Request $request): array
{
return [
'id' => $this->getId(),
'type' => $this->getType(),
'title' => $this->getTitle(),
'description' => $this->getDescription(),
'options' => $this->getOptions(),
'required' => $this->getRequired(),
'event_id' => $this->getEventId(),
'belongs_to' => $this->getBelongsTo(),
'order' => $this->getOrder(),
'product_ids' => $this->when(
! is_null($this->getProducts()),
fn () => $this->getProducts()->map(fn ($product) => $product->getId())
),
];
}
}