PHP code example of spatie / mjml-sidecar

1. Go to this page and download the library: Download spatie/mjml-sidecar 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/ */

    

spatie / mjml-sidecar example snippets


/*
 * All of your function classes that you'd like to deploy go here.
 */
'functions' => [
    \Spatie\MjmlSidecar\MjmlFunction::class,
],

Mjml::new()->sidecar()->toHtml($mjml);
shell
php artisan sidecar:deploy --activate