Файловый менеджер - Редактировать - /home/clickysoft/public_html/charliapp-v2.clickysoft.net/app/Http/Resources/Admin/PlotPlannerDetailResource.php
Назад
<?php namespace App\Http\Resources\Admin; use Illuminate\Http\Resources\Json\JsonResource; class PlotPlannerDetailResource extends JsonResource { public function toArray($request) { // return parent::toArray($request); // $plot_lines = $this->plotLines; // $plotLines = []; // foreach ($plot_lines as $plotLine) { // $plotLines[] = [ // "id" => $plotLine->id, // "plotline_title" => $plotLine->plotline_title, // "plotline_json" => $plotLine->plotline_json, // 'color_id' => $plotLine->color->id, // 'color' => $plotLine->color->color, // 'color_code' => $plotLine->color->color_code, // 'foreground_color' => $plotLine->color->foreground_color, // ]; // } return [ 'id' => $this->id, 'plot_planner_title' => $this->plot_planner_title, 'description' => $this->description, 'plotlines_json' => $this->plotlines_json, 'image_id' => $this->image_id, 'image_url' => $this->image ? $this->image->image_url : null, 'book' => $this->book ? [ "book_id" => $this->book->id, "book_name" => $this->book->book_name, ] : [], '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, 'foreground_color' => $this->color->foreground_color, // 'plot_lines' => $plotLines, 'comments' => $this->comments ?? [], ]; } }
| ver. 1.4 |
Github
|
.
| PHP 8.1.29 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка