for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace DiamondByBOLD\FlysystemAzureBlobStorage\MediaLibrary\UrlGenerator;
use DateTimeInterface;
use Spatie\MediaLibrary\UrlGenerator\BaseUrlGenerator;
class AzureBlobUrlGenerator extends BaseUrlGenerator
{
/**
* Get the url for the profile of a media item.
*
* @return string
*/
public function getUrl() : string
return config('medialibrary.azure.domain').'/'.$this->getPathRelativeToRoot();
}
* Get the temporary url for a media item.
* @param \DateTimeInterface $expiration
* @param array $options
public function getTemporaryUrl(DateTimeInterface $expiration, array $options = []): string
return $this
->filesystemManager
->disk($this->media->disk)
->temporaryUrl($this->getPath(), $expiration, $options);
public function getPath(): string
return $this->getPathRelativeToRoot();
* Get the url to the directory containing responsive images.
public function getResponsiveImagesDirectoryUrl(): string
return config('medialibrary.azure.domain') . '/' .
$this->pathGenerator->getPathForResponsiveImages($this->media);