25 lines
702 B
PHP
25 lines
702 B
PHP
<?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,
|
|
'exact_location' => $this->exact_location,
|
|
'date_text' => $this->date_text,
|
|
'attachment_id' => $this->attachment_id,
|
|
'image' => $this->attachment?->getTemporaryUrl(1440),
|
|
];
|
|
}
|
|
}
|