3 days ago

x-component : cannot pass variable in <>

Posted 3 days ago by JnTng


I am learning the blade lesson. I try to pass variable title in <>, but it dosen't work.

The content.blade can show "Buy Me a Coffee" and " Laravel 7 Blade Component Note". Why the "Laravel" not show up?


<x-layout title="Laravel">
    <x-slot name="ad">
        Buy Me a Coffee

    Laravel 7 Blade Component Note


    Hello {{ $title }}

    @if( isset($ad) )
        <div class="ad">
            {{ $ad }}

    <div class="dashboard">
        {{ $slot ?? '' }}

Please sign in or create an account to participate in this conversation.