Files
alrahma_sunday_school_api/app/Http/Resources/Settings/SchoolCalendarEventResource.php
T
2026-04-25 00:00:23 -04:00

21 lines
600 B
PHP

<?php
namespace App\Http\Resources\Settings;
use Illuminate\Http\Resources\Json\JsonResource;
class SchoolCalendarEventResource extends JsonResource
{
public function toArray($request): array
{
return [
'id' => $this['id'] ?? null,
'title' => (string) ($this['title'] ?? ''),
'start' => (string) ($this['start'] ?? ''),
'description' => (string) ($this['description'] ?? ''),
'backgroundColor' => $this['backgroundColor'] ?? null,
'extendedProps' => (array) ($this['extendedProps'] ?? []),
];
}
}