jeudi 29 novembre 2018

Mailable components not including panel.blade.php

I am trying to get my head around laravel's mailables and the way it is rendered. I read the docs, but I couldn't find anything about this.

I published the mailable components to be able to customize, the live in resources/views/vendor/mail/html and the markdown folder

I also have resources/views/emails/testing.blade.php

I am using markdown as indicated in the docs it will make use of the default template and it will also render the text version

I am essentially tyring to understand why panel won't render where I have the panel tag

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
    <style>
        @media only screen and (max-width: 600px) {
            .inner-body {
                width: 100% !important;
            }

            .footer {
                width: 100% !important;
            }
        }

        @media only screen and (max-width: 500px) {
            .button {
                width: 100% !important;
            }
        }
    </style>

    <table class="wrapper" width="100%" cellpadding="0" cellspacing="0">
        <tr>
            <td align="center">
                <table class="content" width="100%" cellpadding="0" cellspacing="0">

                    

                     <!-- Why can't I render it here???? -->

                    <!-- Email Body -->
                    <tr>
                        <td class="body" width="100%" cellpadding="0" cellspacing="0">
                            <table class="inner-body" align="center" width="570" cellpadding="0" cellspacing="0">
                                <!-- Body content -->
                                <tr>
                                    <td class="content-cell">

                                        

                                        
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>

                    
                </table>
            </td>
        </tr>
    </table>
</body>
</html>

and my testing.blade.php

@component('mail::panel')
        Some panel content
@endcomponent

@component('mail::message')
Welcome to the site 

Your registered email is  , Please click on the below link to verify your email account

@component('mail::subcopy')
        super subcopy
@endcomponent

@component('mail::button', ['url' => url('/')])
My Button
@endcomponent

Thanks,<br>


@endcomponent

The only way panel seems to render is if I have it inside @component('mail::message') but even so it won't render where I indicated above?

Anyone? cheers



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire