FareedR
2 months ago
276
1
Laravel

Add custom blade in markdown

Posted 2 months ago by FareedR

Currently working on with Markdown. And I added custom view for "image". But laravel.log sent me " View [image] not found. Anyone know how to fix it ? The reason i add new custom view for "image" because i want image that align center.

// vendor/mail/html/image.blade.php
<table class="action" align="center" width="100%" cellpadding="0" cellspacing="0" role="presentation">
    <tr>
        <td align="center">
            <table width="100%" border="0" cellpadding="0" cellspacing="0" role="presentation">
                <tr>
                    <td align="center">
                        <table border="0" cellpadding="0" cellspacing="0" role="presentation">
                            <tr>
                                <td>
                                    <img style="width:100px;" src="{{ $url }}">{{ $slot }}
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
        </td>
    </tr>
</table>
// Markdown Notification
@component('mail::message')
@component('mail::image', ['url' => asset('/mailing_images/mail.png')])
@endcomponent

Hey {{ strtoupper($user->name) }},

Yahoooooo! Thanks for registering an account with us! 

Before we get started, we'll need to verify your email.

@component('mail::button', ['url' => $url, 'color' => 'amazon', 'transform' => 'text-uppercase'])
Verify Email
@endcomponent

Thanks, <br/>
{{ config('app.name') }} TEAM
@endcomponent

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