src/Http/Resources/TopicType/Export/ImageResource.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 ImageResource extends JsonResource implements TopicTypeResourceContract
{
public function toArray($request)
{
return [
'value' => TopicTypeService::sanitizePath($this->value),
'width' => $this->width,
'height' => $this->height,
];
}
}