Completed
Push — master ( a3cdd1...2e03c9 )
by Freek
04:35
created

S3UrlGenerator::getPath()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Spatie\MediaLibrary\UrlGenerator;
4
5
class S3UrlGenerator extends BaseUrlGenerator
6
{
7
    /**
8
     * Get the url for the profile of a media item.
9
     *
10
     * @return string
11
     */
12
    public function getUrl(): string
13
    {
14
        return config('medialibrary.s3.domain').'/'.$this->getPathRelativeToRoot();
15
    }
16
17
    /**
18
     * Get the url for the profile of a media item.
19
     *
20
     * @return string
21
     */
22
    public function getPath(): string
23
    {
24
        return $this->getPathRelativeToRoot();
25
    }
26
}
27