feat(tickets): group user tickets by event

This commit is contained in:
2026-09-22 12:26:16 -03:00
parent 6efe8439c7
commit 3401c934b2
12 changed files with 289 additions and 20 deletions

View File

@@ -0,0 +1,21 @@
<?php
namespace App\Domains\Ticketing\Ticket\Resources;
use App\Domains\Ticketing\Event\Models\Event;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
/** @mixin Event */
class TicketEventResource extends JsonResource
{
/** @return array<string, mixed> */
public function toArray(Request $request): array
{
return [
'id' => $this->id,
'title' => $this->title,
'image' => $this->attachment?->getTemporaryUrl(1440),
];
}
}

View File

@@ -15,6 +15,7 @@ class TicketResource extends JsonResource
return [
'id' => $this->id,
'tenant_code' => $this->tenant_code,
'event_id' => $this->event_id,
'ticket' => $this->ticket,
'status' => $this->status,
'status_label' => $this->status_label,