File manager - Edit - /var/www/html/spdc/api/app/Http/Resources/ShelterDetailedResource.php
Back
<?php namespace App\Http\Resources; use Carbon\Carbon; use Illuminate\Http\Resources\Json\JsonResource; class ShelterDetailedResource 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, 'managers' => ShelterManagerResource::collection($this->shelterManagers), 'shelter_common_areas' => ShelterCommonAreaResource::collection($this->shelterCommonAreas), 'shelter_bathrooms' => ShelterBathroomsResource::collection($this->shelterBathrooms), 'shelter_kitchens' => ShelterKitchenResource::collection($this->shelterKitchens), 'shelter_water_tanks' => ShelterWaterTankResource::collection($this->shelterWaterTanks), 'shelter_service_areas' => ShelterServiceAreaResource::collection($this->shelterServiceAreas), 'shelter_files' => ShelterFileResource::collection($this->shelterFiles), 'shelter_families' => ShelterMemberFamilyResource::collection($this->shelterMembersFamily), 'shelter_pets' => ShelterPetsResource::collection($this->shelterPets), 'historics' => ShelterHistoricResource::collection($this->shelterHistorics), 'families_responsible' => ShelterFamilyResource::collection($this->shelterFamilies) ]; } }
| ver. 1.4 |
Github
|
.
| PHP 8.3.28 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings