Jantlap
1 year ago

Cant wrap my head around markdown mailables

Posted 1 year 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.