File: D:/HostingSpaces/brameda/brameda.nl/app/Komma/Shop/Properties/Models/Api/PropertyValueResource.php
<?php
namespace App\Komma\Shop\Properties\Models\Api;
use Illuminate\Http\Resources\Json\Resource;
class PropertyValueResource extends Resource
{
/**
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
*/
public function toArray($request)
{
return [
'id' => $this->id,
'created_at' => $this->created_at,
'updated_at' => $this->updated_at,
'translations' => $this->when($this->translations, PropertyValueTranslationResource::collection($this->translations))
];
}
}