<?php

namespace App\Http\Resources\Company\Employeee;

use Illuminate\Http\Resources\Json\JsonResource;

class WorkerFiles 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 parent::toArray($request);
        return [
            'id' => $this->id,
            'worker_id' => $this->worker_id,
            'name' => $this->name,
            'location' => $this->location? env('GOOGLE_CLOUD_LINK') .'/'. $this->location: null,
            'raw_location' => $this->location,
            'type' => $this->type,
        ];
    }
}
