File manager - Edit - /var/www/html/spdc/api/app/Http/Resources/TransportationSupplyResource.php
Back
<?php namespace App\Http\Resources; use Illuminate\Http\Resources\Json\JsonResource; class TransportationSupplyResource extends JsonResource { /** * Transform the resource into an array. * * @param \Illuminate\Http\Request $request * @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable */ public function toArray($request) { return [ 'id' => $this->id, 'hour' => now()->parse($this->hour)->format('H:i'), 'odometer' => $this->odometer, 'liters' => $this->liters, 'document_number' => $this->document_number, 'file' => $this->file, 'transportation_id' => $this->transportation_id, 'bdt_id' => $this->bdt_id, 'transportation' => new TransportationResource($this->whenLoaded('transportation')), 'bdt' => new BDTResource($this->whenLoaded('bdt')), ]; } }
| ver. 1.4 |
Github
|
.
| PHP 8.3.28 | Generation time: 0.01 |
proxy
|
phpinfo
|
Settings