Spatie\MediaLibrary\Media::getPath PHP 메소드

getPath() 공개 메소드

Get the original path to a media-file.
public getPath ( string $conversionName = '' ) : string
$conversionName string
리턴 string
    public function getPath(string $conversionName = '') : string
    {
        $urlGenerator = UrlGeneratorFactory::createForMedia($this);
        if ($conversionName != '') {
            $urlGenerator->setConversion(ConversionCollection::createForMedia($this)->getByName($conversionName));
        }
        return $urlGenerator->getPath();
    }