LaravelPackages.net
Acme Inc.
Toggle sidebar
zerdo/laravel-mjml

A Laravel package that allows you to integrate with the MJML seamlessly.

7
0
0.0.1
About zerdo/laravel-mjml

zerdo/laravel-mjml is a Laravel package for a laravel package that allows you to integrate with the mjml seamlessly.. It currently has 0 GitHub stars and 7 downloads on Packagist (latest version 0.0.1). Install it with composer require zerdo/laravel-mjml. Discover more Laravel packages by zerdo or browse all Laravel packages to compare alternatives.

Last updated



composer require zerdo/laravel-mjml


Basic Usage

MJMLChannel

Use MJMLChannel when you want to send a email via the MJML api.

<?php

use Zerdo\LaravelMJML\MJMLChannel;

class OrderNotification extends Notification implements ShouldQueue {
    ...

    public function via()
    {
        return [MJMLChannel::class];
    }
}
MJMLMessage

Use MJMLMessage when you want to construct a blade view using MJML components.

<?php

use Zerdo\LaravelMJML\MJMLMessage;

class OrderNotification extends Notification implements ShouldQueue {
    ...
    public function toMail()
    {
        return (new MJMLMessage)->subject('...')->mjml('emails.mjml-template');
    }
}

###Usage for Lumen This package does work with Lumen but there is an extra step that you have to take.

  • Navigate to bootstrap/app.php.
  • Add the following line: $app->configure('laravel-mjml');

Star History Chart