File manager - Edit - /var/www/html/homologBancodetalentos/app/Http/Resources/TalentBank/CandidateSessionResource.php
Back
<?php namespace App\Http\Resources\TalentBank; use App\Http\Resources\TalentBank\Candidate\CourseResource; use App\Http\Resources\TalentBank\Candidate\EducationResource; use App\Http\Resources\TalentBank\Candidate\ExperienceResource; use App\Http\Resources\TalentBank\Candidate\SkillResource; use App\Models\TalentBank\LanguageProficiency; use Illuminate\Http\Resources\Json\JsonResource; class CandidateSessionResource extends JsonResource { public function toArray($request): array { return [ 'id' => $this->id, 'cpf' => $this->cpf, 'name' => $this->name, 'email' => $this->email, 'photo' => $request->user['data']['picture'] ?? null, 'address' => $this->address, 'zip_code' => $this->zip_code, 'birth_date' => $this->birth_date, 'special_needs' => $this->special_needs, 'telephone' => $this->telephone, 'cellphone' => $this->cellphone, 'min_payment' => $this->min_payment, 'desired_payment' => $this->desired_payment, 'cv_summary' => $this->cv_summary, 'has_experience' => $this->has_experience, 'active' => $this->active, 'ethnicity' => $this->ethnicity?->name, 'neighbourhood' => $this->neighbourhood()->get(['id', 'name'])->first(), 'gender' => $this->gender()->get(['id', 'name'])->first(), 'marital_status' => $this->maritalStatus()->get(['id', 'name'])->first(), 'occupation' => $this->occupation()->get(['id', 'name'])->first(), 'skill' => SkillResource::collection($this->skills), 'course' => CourseResource::collection($this->courses), 'education' => EducationResource::collection($this->educations), 'experience' => ExperienceResource::collection($this->experiences), 'language' => $this->languages->map(function ($language) { $prof = LanguageProficiency::find($language->pivot->language_proficiency_id); return [ 'language_id' => $language->id, 'name' => $language->name, 'proficiency' => [ 'language_proficiency_id' => $language->pivot->language_proficiency_id, 'name' => $prof?->name, ], ]; }), 'application' => ApplicationResource::collection($this->applications), ]; } }
| ver. 1.4 |
Github
|
.
| PHP 8.3.28 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings