Skip to content

Commit f7a88f8

Browse files
authored
Merge pull request #8 from archilex/add-default-image
Add support for defaultImageUrl()
2 parents 18d445b + 5f531e0 commit f7a88f8

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

resources/views/columns/stacked-image-column.blade.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@
66
$overlap = $getOverlap() ?? 1;
77
$imageCount = 0;
88
9+
$defaultImageUrl = $getDefaultImageUrl();
10+
11+
if ((! count($images)) && filled($defaultImageUrl)) {
12+
$imagesWithPath = [null];
13+
}
14+
15+
916
$ring = match ($getRing()) {
1017
0 => 'ring-0',
1118
1 => 'ring-1',
@@ -50,7 +57,7 @@
5057
@endphp
5158

5259
<img
53-
src="{{ $path }}"
60+
src="{{ filled($image) ? $getPath($image) : $defaultImageUrl }}"
5461
style="
5562
{!! $height !== null ? "height: {$height};" : null !!}
5663
{!! $width !== null ? "width: {$width};" : null !!}

0 commit comments

Comments
 (0)