Файловый менеджер - Редактировать - /home/clickysoft/public_html/jmapi5.clickysoft.net/app/Http/Resources/Admin/UserResource.php
Назад
<?php namespace App\Http\Resources\Admin; use Illuminate\Http\Resources\Json\JsonResource; class UserResource extends JsonResource { public function toArray($request) { // return parent::toArray($request); $roles = []; foreach ($this->roles ?? [] as $role){ $roles[] = ["id" => $role->id, "name" => $role->title]; } return [ 'id' => $this->id, 'name' => $this->name, 'email' => $this->email, 'phone_number' => $this->phone_number, 'company' => $this->company, 'fax_number' => $this->fax_number, 'email_verified' => $this->email_verified_at ? 'Yes' : 'No', 'user_type' => $this->user_type_name, 'birth_date' => $this->birth_date ? $this->birth_date->format('m-d-Y') : $this->birth_date, 'secondary_email' => $this->secondary_email, 'secondary_phone' => $this->secondary_phone, 'secondary_name' => $this->secondary_name, 'status' => $this->status_name, 'reminder_duration' => $this->reminder_duration, 'profile_image' => $this->profile_image?->url, 'sms_notification' => $this->sms_notification, 'created_at' => $this->created_at->format('m-d-Y'), 'updated_at' => $this->updated_at->format('m-d-Y'), 'roles' => $roles, ]; } }
| ver. 1.4 |
Github
|
.
| PHP 8.1.29 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка