Файловый менеджер - Редактировать - /home/clickysoft/public_html/assets.clickysoft.net/app/Http/Resources/Api/MaintenanceScheduleDetailResource.php
Назад
<?php namespace App\Http\Resources\Api; use Illuminate\Http\Resources\Json\JsonResource; use Storage; class MaintenanceScheduleDetailResource extends JsonResource { public function toArray($request) { return [ 'id' => $this->id, 'key' => $this->id, 'asset_id' => $this->asset_id, 'tag_id' => $this->tag_id, 'asset' => [ "id" => $this->asset->id, "asset_name" => $this->asset->asset_name, "asset_image" => [ "thumbnail" => $this->asset->asset_image?->thumbnail ?? "https://placehold.co/100x100/EEE/31343C?font-Lato&text=" . strtoupper(substr($this->asset->asset_name, 0, 2)), "url" => $this->asset->asset_image?->url ?? "https://placehold.co/200x200/EEE/31343C?font-Lato&text=" . strtoupper(substr($this->asset->asset_name, 0, 2)), ], "tag" => $this->tag ? [ "id" => $this->tag->id, "tag_name" => $this->tag->tag_name, "serial" => $this->tag->serial, 'bar_code' => $this->tag_id ? $this->organization_id . "-" . $this->asset_id . "-" . $this->tag_id : null, ] : null ], 'maintenance_type' => $this->maintenance_type, 'assigned_to' => $this->assigned_to, 'assignee' => [ "id" => $this->user->id, "full_name" => $this->user->full_name, "avatar" => [ "thumbnail" => $this->user->avatar?->thumbnail ?? "https://placehold.co/100x100/EEE/31343C?font-Lato&text=" . strtoupper(substr($this->user->first_name, 0, 2)), "url" => $this->user->avatar?->url ?? "https://placehold.co/200x200/EEE/31343C?font-Lato&text=" . strtoupper(substr($this->user->first_name, 0, 2)), ], ], 'scheduled_date' => $this->scheduled_date, 'completion_date' => $this->completion_date, 'status' => $this->status, 'frequency' => $this->frequency, 'interval' => $this->interval, 'currency_id' => $this->currency_id, 'currency' => $this->currency ? [ "id" => $this->currency->id, "name" => $this->currency->name, "symbol" => $this->currency->symbol, ] : null, 'cost' => $this->cost, 'notes' => $this->notes, 'created_at' => $this->created_at, 'updated_at' => $this->updated_at, ]; } }
| ver. 1.4 |
Github
|
.
| PHP 8.1.29 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка