Skip to content

Commit bc6247d

Browse files
committed
Allow slot for link util
1 parent b81b6b5 commit bc6247d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

resources/views/components/utils/link.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
@if ($permission)
44
@if ($logged_in_user->can($permission))
55
@if (!$hide)
6-
<a {{ $attributes->merge(['href' => '#', 'class' => $active]) }}>@if ($icon)<i class="{{ $icon }}"></i> @endif{{ $text }}</a>
6+
<a {{ $attributes->merge(['href' => '#', 'class' => $active]) }}>@if ($icon)<i class="{{ $icon }}"></i> @endif{{ strlen($text) ? $text : $slot }}</a>
77
@endif
88
@endif
99
@else
1010
@if (!$hide)
11-
<a {{ $attributes->merge(['href' => '#', 'class' => $active]) }}>@if ($icon)<i class="{{ $icon }}"></i> @endif{{ $text }}</a>
11+
<a {{ $attributes->merge(['href' => '#', 'class' => $active]) }}>@if ($icon)<i class="{{ $icon }}"></i> @endif{{ strlen($text) ? $text : $slot }}</a>
1212
@endif
1313
@endif

0 commit comments

Comments
 (0)