Conditions | 5 |
Paths | 4 |
Total Lines | 19 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
31 | protected function storageUrl(string $path): ?string |
||
32 | { |
||
33 | if (isset($this->file) and $this->file == LARUPLOAD_NULL) { |
||
34 | return null; |
||
35 | } |
||
36 | |||
37 | if ($this->driverIsLocal()) { |
||
38 | $url = Storage::disk($this->disk)->url($path); |
||
39 | |||
40 | return url($url); |
||
41 | } |
||
42 | |||
43 | $baseUrl = config("filesystems.disks.$this->disk.url"); |
||
44 | |||
45 | if ($baseUrl) { |
||
46 | return "$baseUrl/$path"; |
||
47 | } |
||
48 | |||
49 | return $path; |
||
50 | } |
||
71 |