Файловый менеджер - Редактировать - /home/clickysoft/public_html/charliapp-v2.clickysoft.net/app/Http/Resources/Admin/SeriesResource.php
Назад
<?php namespace App\Http\Resources\Admin; use Illuminate\Http\Resources\Json\JsonResource; class SeriesResource extends JsonResource { public function toArray($request) { // return parent::toArray($request); $books = []; foreach ($this->books as $book) { $books[] = [ "id" => $book->id, "book_name" => $book->book_name, "chapters_count" => count($book->chapters), "task_count" => 0 ]; } return [ 'id' => $this->id, 'series_name' => $this->series_name, 'series_description' => $this->series_description, 'books' => $books, 'is_finished' => $this->is_finished, '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, H:i:s'), 'updated_at' => (new \Carbon\Carbon($this->updated_at))->format('F d, Y, H:i:s'), 'color_id' => $this->color->id, 'color' => $this->color->color, 'color_code' => $this->color->color_code, 'foreground_color' => $this->color->foreground_color, 'comments' => $this->comments ?? [], ]; } }
| ver. 1.4 |
Github
|
.
| PHP 8.1.29 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка