File manager - Edit - /var/www/html/spdc/api/app/Http/Resources/ShelterResource.php
Back
<?php namespace App\Http\Resources; use Carbon\Carbon; use Illuminate\Http\Resources\Json\JsonResource; class ShelterResource 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, 'name' => $this->name, 'city' => $this->city, 'state' => $this->state, 'number' => $this->number, 'zip_code' => $this->zip_code, 'neighborhood' => $this->neighborhood, 'street' => $this->street, 'reference_point' => $this->reference_point, 'latitude' => $this->latitude, 'longitude' => $this->longitude, 'phone' => $this->phone, 'service_capacity' => $this->service_capacity, 'bathroom_total' => $this->bathroom_total, 'created_by' => $this->created_by, 'responsible_for_completing' => $this->responsible_for_completing, 'is_real_open' => $this->is_real_open ? "true" : "false", 'closed_by' => $this->closed_by, 'closed_in' => $this->closed_in ? Carbon::parse($this->closed_in)->format('d-m-Y H:i:s') : null, 'opening_date' => $this->opening_date ? Carbon::parse($this->opening_date)->format('d-m-Y H:i:s') : null, 'is_shelter' => $this->is_shelter, 'is_support_point' => $this->is_support_point, 'observation_open' => $this->observation_open, 'observation_closed' => $this->observation_closed, 'open_by' => $this->open_by, ]; } }
| ver. 1.4 |
Github
|
.
| PHP 8.3.28 | Generation time: 0.01 |
proxy
|
phpinfo
|
Settings