<?php

namespace App\Http\Resources;

use App\Http\Resources\UserResource as UserResource;
use App\Http\Resources\ModelResource;
use Illuminate\Http\Resources\Json\JsonResource;

use Illuminate\Http\Request;

class TypeResource extends JsonResource
{
    /**
     * Transform the resource into an array.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return array
     */
    public function toArray($request)
    {
        
        $data =  [
            'id' => $this->id,
            'name' =>$this->descriptions(currentLanguage()->id)['name'],
            
            
            
            
      ];
     
         
      
      return $data;
    }
}
