Ngiler SH3LL 360
Home
Information
Create File
Create Folder
:
/
home
/
tbf
/
tbfguestbe.tbf.ro
/
app
/
Http
/
Resources
/
Information Server
MySQL :
OFF
Perl :
OFF
CURL :
ON
WGET :
OFF
PKEXEC :
OFF
Directive
Local Value
IP Address
89.40.16.97
System
Linux server.atelieruldeit.ro 3.10.0-1160.el7.x86_64 #1 SMP Mon Oct 19 16:18:59 UTC 2020 x86_64
User
tbf
PHP Version
7.3.33
Software
Apache
Doc root
Writable
close
Edit File :
RecruitmentShowResource.php
| Size :
3.25
KB
Copy
<?php namespace App\Http\Resources; use Illuminate\Http\Request; use Illuminate\Http\Resources\Json\JsonResource; class RecruitmentShowResource extends JsonResource { /** * Transform the resource into an array. * * @return array<string, mixed> */ public function toArray(Request $request): array { return [ 'id' => $this->id, 'position_id' => $this->position_id, 'title' => $this->title, 'description' => $this->description, 'settings' => [ 'phone' => $this->phone, 'email' => $this->email, 'id_form' => $this->id_form, 'logo' => $this->position->instance->logo, 'color' => $this->position->instance->color, ], 'responsibilities' => $this->responsibilities->map(function ($responsibility) { return [ 'id' => $responsibility->id, 'description' => $responsibility->description, 'kpi' => $responsibility->kpi, ]; }), 'abilities' => $this->abilities->map(function ($ability) { return [ 'id' => $ability->id, 'description' => $ability->description, 'importance' => $ability->importance, ]; }), 'details' => $this->details->map(function ($item) { return [ 'id' => $item->id, 'code' => $item->code, 'title' => $item->title, 'description' => $item->description, 'category' => $item->category, 'active' => $item->active, ]; }), 'activities' => $this->activities->map(function($activity) { return [ 'id' => $activity->id, 'title' => $activity->title, 'description' => $activity->description, 'importance' => $activity->importance, ]; }), $this->mergeWhen(null !== $this->emailNotice, [ 'email' => [ 'id' => $this->emailNotice->id, 'subject' => $this->emailNotice->subject, 'message' => $this->emailNotice->message, ] ]), $this->mergeWhen(null !== $this->message, [ 'message' => [ 'id' => $this->message->id, 'message' => $this->message->message, ] ]), 'questions' => $this->questions->map(function($question) { return [ 'id' => $question?->id, 'question' => $question?->question, 'answers' => $question?->answers->map(function($answer) { return [ 'id' => $answer?->id, 'answer' => $answer?->answer, 'is_correct' => $answer?->is_correct, ]; }), ]; }), ]; } }
Back