Файловый менеджер - Редактировать - /home/clickysoft/public_html/charliapp-v2.clickysoft.net/app/Http/Resources/Admin/TimelineDetailResource.php
Назад
<?php namespace App\Http\Resources\Admin; use Illuminate\Http\Resources\Json\JsonResource; class TimelineDetailResource extends JsonResource { public function toArray($request) { // return parent::toArray($request); $eventTypes = []; foreach ($this->eventTypes as $eventType) { $eventBlocks = []; foreach ($eventType->eventBlocks as $eventBlock) { $eventBlocks[] = [ "id" => $eventBlock->id, "event_name" => $eventBlock->event_name, "event_description" => $eventBlock->event_description, "position_x" => $eventBlock->position_x, "size" => $eventBlock->size, "outline" => $eventBlock->outline->outline_name ?? null, ]; } $eventTypes[] = [ "id" => $eventType->id, "event_type_name" => $eventType->event_type, "color" => $eventType->color->color_code, 'foreground_color' => $eventType->color->foreground_color, "eventBlocks" => $eventBlocks ]; } return [ 'id' => $this->id, 'name' => $this->name, 'description' => $this->description, 'event_types' => $eventTypes, 'image_id' => $this->image_id, 'image_url' => $this->image ? $this->image->image_url : NULL, 'created_at' => (new \Carbon\Carbon($this->created_at))->format('F d, Y'), 'updated_at' => (new \Carbon\Carbon($this->updated_at))->format('F d, Y'), 'color_id' => $this->color->id, 'color' => $this->color->color, 'color_code' => $this->color->color_code, ]; } }
| ver. 1.4 |
Github
|
.
| PHP 8.1.29 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка