PHP code example of sebastienheyd / boilerplate-email-editor

1. Go to this page and download the library: Download sebastienheyd/boilerplate-email-editor 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/ */

    

sebastienheyd / boilerplate-email-editor example snippets


use Sebastienheyd\BoilerplateEmailEditor\Models\Email;

// Setting data
$data = ['first_name' => 'John', 'last_name' => 'Doe'];

// Sending email by his slug
Email::findBySlug('my_slug')->send('[email protected]', $data);

// Or by his id
Email::find(1)->send('[email protected]', $data);

php artisan migrate

php artisan vendor:publish --tag=email-editor-config

php artisan vendor:publish --tag=email-editor-layout

php artisan email:layout {name} 

php artisan vendor:publish --tag=email-editor-config

php artisan email:layout --remove {name}