Files
alrahma_sunday_school_api/app/Http/Resources/Settings/SchoolCalendarEventDetailResource.php
T
2026-03-10 16:55:50 -04:00

28 lines
1010 B
PHP

<?php
namespace App\Http\Resources\Settings;
use Illuminate\Http\Resources\Json\JsonResource;
class SchoolCalendarEventDetailResource extends JsonResource
{
public function toArray($request): array
{
return [
'id' => (int) ($this->id ?? 0),
'title' => (string) ($this->title ?? ''),
'description' => (string) ($this->description ?? ''),
'event_type' => $this->event_type ?? null,
'date' => (string) ($this->date ?? ''),
'notify_parent' => (int) ($this->notify_parent ?? 0),
'notify_teacher' => (int) ($this->notify_teacher ?? 0),
'notify_admin' => (int) ($this->notify_admin ?? 0),
'no_school' => (int) ($this->no_school ?? 0),
'semester' => (string) ($this->semester ?? ''),
'school_year' => (string) ($this->school_year ?? ''),
'created_at' => $this->created_at ?? null,
'updated_at' => $this->updated_at ?? null,
];
}
}