feat(events): expose published events to storefront

This commit is contained in:
2026-09-18 14:33:28 -03:00
parent 8d2250d247
commit f6e8716218
5 changed files with 110 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
<?php
namespace App\Domains\Ticketing\Event\Resources;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
class PublicEventResource extends JsonResource
{
public function toArray(Request $request): array
{
return [
'id' => $this->id,
'title' => $this->title,
'subtitle' => $this->subtitle,
'description' => $this->description,
'location' => $this->location,
'date_text' => $this->date_text,
'attachment_id' => $this->attachment_id,
'image' => $this->attachment?->getTemporaryUrl(1440),
];
}
}