21 lines
600 B
PHP
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'] ?? []),
|
|
];
|
|
}
|
|
}
|