PHP code example of vercoutere / laravel-mjml
1. Go to this page and download the library: Download vercoutere/laravel-mjml library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
vercoutere / laravel-mjml example snippets
use Illuminate\Mail\Mailables\Content;
use Vercoutere\LaravelMjml\MjmlMailable;
class MyMail extends MjmlMailable
{
public function content(): Content
{
return new Content(
view: 'my-template',
);
}
}
html
<mjml>
<mj-body>
<mj-section>
<mj-column>
<mj-raw>@if (true)</mj-raw>
<mj-text font-size="20px" color="#F45E43">{{ App::environment() }}</mj-text>
<mj-raw>@endif</mj-raw>
</mj-column>
</mj-section>
</mj-body>
</mjml>