PHP code example of zerdo / laravel-mjml
1. Go to this page and download the library: Download zerdo/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/ */
zerdo / laravel-mjml example snippets
use Zerdo\LaravelMJML\MJMLChannel;
class OrderNotification extends Notification implements ShouldQueue {
...
public function via()
{
return [MJMLChannel::class];
}
}
use Zerdo\LaravelMJML\MJMLMessage;
class OrderNotification extends Notification implements ShouldQueue {
...
public function toMail()
{
return (new MJMLMessage)->subject('...')->mjml('emails.mjml-template');
}
}