Skip to content

Named Slots from an Include Do Not Appear #182

@EvilLooney

Description

@EvilLooney

Describe the bug
If we include a normal view inside a layout-type Blaze component that contains named slots, those slots will not be rendered when referenced by the included view.

Component causing the issue

{{-- test.blade.php --}}
<x-layout>
    @include('included')
</x-layout>
{{-- included.blade.php --}}
Hello <x-slot:secondary>World</x-slot:secondary>
{{-- components/layout.blade.php --}}
@blaze
<div>
    {{ $slot }}
    {{ $secondary ?? '' }}
</div>

Expected behavior
Hello World

Actual behavior
Hello

Environment

  • Laravel version: 13.13.0
  • PHP version: 8.5.5
  • Blaze version: 1.0.12

Additional context
Removing the Blaze directive or manually pasting the contents of the included file inside the root view fixes the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions