File manager - Edit - /var/www/html/pcadigital/api/app/Http/Resources/HistoricResource.php
Back
<?php namespace App\Http\Resources; use Carbon\Carbon; use Illuminate\Http\Resources\Json\JsonResource; class HistoricResource 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, 'status' => $this->status, 'created_by' => $this->created_by, 'observation' => $this->observation, 'organ_name' => $this->organ_name, 'organ_id' => $this->organ_id, 'others' => $this->others, 'final_comment' => $this->final_comment, 'created_at' => Carbon::parse($this->created_at)->format('d-m-Y'), 'occurrence_id' => $this->occurrence->id, 'category' => $this->category->name ?? null, 'sub_category' => $this->subCategory->name ?? null, 'images_url' => json_decode($this->images_url), 'is_send_to_citizen' => $this->is_send_to_citizen, ]; } }
| ver. 1.4 |
Github
|
.
| PHP 8.3.28 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings