Well yes, yes I did!
I've got a navbar-link component:
@props([
'svg',
'route',
])
<a href="{{ route($route) }}" class="w-full focus:text-teal-500 hover:text-teal-500 justify-center inline-block text-center pt-2 pb-1">
<div {{ $svg->attributes->class(['inline-block']) }}>
{{ $svg }}
</div>
<span class="tab tab-home block text-xs">{{ $slot }}</span>
</a>
And I'm using it like this:
<x-navbar-link route="home">
<x-slot name="svg">
<svg width="25" height="25" viewBox="0 0 42 42" class="inline-block mb-1">
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
...
</g>
</svg>
</x-slot>
Index
</x-navbar-link>
But then I get:
ErrorException
Undefined variable $svg (View: ...
Possible typo $svg
Did you mean $svg?
Which kinda doesn't make any sense.. at first glance at least.
What am I missing?
Update
So, I'm using the navbar-link component inside a navbar component, which I'm lastly referencing inside a layout called app. When I put the navbar-link inside navbar I get the above mentioned error. If I put the navbar-link outside (directly inside the app-layout component) it renders the named slot perfectly.