src/Http/Resources/TopicType/Export/VideoResource.php
<?php
namespace EscolaLms\TopicTypes\Http\Resources\TopicType\Export;
use EscolaLms\TopicTypes\Http\Resources\TopicType\Contacts\TopicTypeResourceContract;
use EscolaLms\TopicTypes\Services\TopicTypeService;
use Illuminate\Http\Resources\Json\JsonResource;
class VideoResource extends JsonResource implements TopicTypeResourceContract
{
public function toArray($request)
{
return [
'value' => TopicTypeService::sanitizePath($this->value),
'poster' => $this->poster ? TopicTypeService::sanitizePath($this->poster) : null,
'width' => $this->width,
'height' => $this->height,
'created_at' => $this->created_at,
'updated_at' => $this->updated_at,
];
}
}