Level 24
oops nevermind
@dd($slot)
// return
Illuminate\Support\HtmlString {#1558 ▼
#html: ""
}
so just simple use
@if ($slot->isNotEmpty())
{{ $slot }}
@endif
<x-test>
Peter
</x-test>
<x-test />
// here always true
@if ($slot)
{{ $slot }}
@endif
It is a HtmlString object:
@if ($slot->isNotEmpty())
Please or to participate in this conversation.