Conditions | 4 |
Paths | 3 |
Total Lines | 16 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
51 | public function getValue() |
||
52 | { |
||
53 | $value = parent::getValue(); |
||
54 | if (!empty($value) && (strpos($value, '://') === false)) { |
||
55 | if (($disk = $this->getDisk())) { |
||
56 | $value = \Storage::disk($disk)->url($value); |
||
57 | } else { |
||
58 | $value = asset($value); |
||
59 | } |
||
60 | } |
||
61 | |||
62 | return [ |
||
63 | 'image' => $value, |
||
64 | 'width' => $this->getImageWidth(), |
||
65 | ]; |
||
66 | } |
||
67 | } |
||
68 |