File manager - Edit - /var/www/html/ciosp/api/app/Http/Resources/TrafficNotificationResource.php
Back
<?php namespace App\Http\Resources; use Illuminate\Http\Resources\Json\JsonResource; class TrafficNotificationResource 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, "address" => $this->address, "number" => $this->number, "neighborhood" => $this->neighborhood, "latitude" => $this->latitude, "longitude" => $this->longitude, "complement" => $this->complement, "zipcode" => $this->zipcode, "vehicle_plate" => $this->vehicle_plate, "vehicle_brand" => new VehicleBrandResource($this->vehicleBrand), "vehicle_model_id" => new VehicleModelResource($this->vehicleModel), "chassis_number" => $this->chassis_number, "vehicle_color" => $this->vehicle_color, "vehicle_type_id" => new VehicleTypeResource($this->vehicleType), "article" => new ArticleResource($this->article), "date" => $this->date, "hour" => $this->hour, "description" => $this->description, "traffic_officer_signature" => $this->traffic_officer_signature, "traffic_offender_signature" => $this->traffic_offender_signature ]; } }
| ver. 1.4 |
Github
|
.
| PHP 8.3.28 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings