| @@ 220-232 (lines=13) @@ | ||
| 217 | return ''; |
|
| 218 | } |
|
| 219 | ||
| 220 | if (url()->isValidUrl($path)) { |
|
| 221 | $src = $path; |
|
| 222 | } elseif ($server) { |
|
| 223 | $src = $server.$path; |
|
| 224 | } else { |
|
| 225 | $disk = config('admin.upload.disk'); |
|
| 226 | ||
| 227 | if (config("filesystems.disks.{$disk}")) { |
|
| 228 | $src = Storage::disk($disk)->url($path); |
|
| 229 | } else { |
|
| 230 | return ''; |
|
| 231 | } |
|
| 232 | } |
|
| 233 | ||
| 234 | return "<img src='$src' style='max-width:{$width}px;max-height:{$height}px' class='img' />"; |
|
| 235 | })->implode(' '); |
|
| @@ 256-268 (lines=13) @@ | ||
| 253 | return ''; |
|
| 254 | } |
|
| 255 | ||
| 256 | if (url()->isValidUrl($path)) { |
|
| 257 | $image = $path; |
|
| 258 | } elseif ($server) { |
|
| 259 | $image = $server.$path; |
|
| 260 | } else { |
|
| 261 | $disk = config('admin.upload.disk'); |
|
| 262 | ||
| 263 | if (config("filesystems.disks.{$disk}")) { |
|
| 264 | $image = Storage::disk($disk)->url($path); |
|
| 265 | } else { |
|
| 266 | $image = ''; |
|
| 267 | } |
|
| 268 | } |
|
| 269 | ||
| 270 | $caption = ''; |
|
| 271 | ||