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