Cant wrap my head around markdown mailables

Posted 10 months ago by Jantlap

Hi,

Im struggling with markdown mailables, I want to have different footer for every e-mail. So Im trying:

@component('mail::layout')
    {{-- Header --}}
    @slot('header')
        @component('mail::header', ['url' => config('app.url')])
            <!-- header here -->
        @endcomponent
    @endslot

    {{-- Body --}}
    # {{__('emails.digest.header')}}

    {{__('emails.digest.first_paragraph', ['list_name' => 'List name'])}}

    @component('mail::panel')
    {{__('emails.digest.subscribed')}} 1
    @endcomponent

    @component('mail::panel')
    {{__('emails.digest.unsubscribed')}} 1
    @endcomponent

    {!! __('emails.digest.unsub', ['account' => 'acc', 'list_id' => 1]) !!}

    {{__('emails.ps')}}

    {{-- Subcopy --}}
    @slot('subcopy')
        @component('mail::subcopy')
            <!-- subcopy here -->
        @endcomponent
    @endslot


    {{-- Footer --}}
    @slot('footer')
        @component('mail::footer')
            <!-- footer here -->
        @endcomponent
    @endslot
@endcomponent

But that way the body is broken. Am I missing something?

Thanks for claryfying.

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

Laracasts Mascot

Hi, Have We Met Yet?

Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.

Sign Me Up

Channels

Reply to

Use Markdown with GitHub-flavored code blocks.