public function media($subject, string $collection, string $type, $associated = []) : string
{
$initialMedia = fractal()->collection($subject->getMedia($collection))->transformWith(new MediaTransformer())->toJson();
$model = collect(['name' => get_class($subject), 'id' => $subject->id])->toJson();
return el('blender-media', ['collection' => $collection, 'type' => $type, 'upload-url' => action('Back\\Api\\MediaLibraryController@add'), ':model' => htmlspecialchars($model), ':initial' => htmlspecialchars($initialMedia), ':data' => htmlspecialchars($this->getAssociatedMediaData($associated))], '');
}