evanschleret/lara-mjml

Just a service provider for Spatie's MJML wrapper

v0.1.2 2024-07-23 12:10 UTC

README

Latest Version on Packagist

This package is a wrapper for the mjml email templating engine. It allows you to easily compile mjml templates into html.

It also uses the spatie mjml package under the hood.

Installation

You can install the package via composer:

composer require evanschleret/lara-mjml

Usage

You can use this package by simply calling the view helper function with the name of your mjml template.

Environment Variables and Configuration

You can set the path to the mjml binary in your .env file.

MJML_NODE_PATH=null
LARA_MJML_BEAUTIFY=false
LARA_MJML_MINIFY=true
LARA_MJML_KEEP_COMMENTS=false

Publish the config file to customize the package configuration and add additional options to the mjml binary.

php artisan vendor:publish --provider="EvanSchleret\LaraMjml\Providers\LaraMjmlServiceProvider"

Changelog

Please see CHANGELOG for more information on what has changed recently.

License

The MIT License (MIT). Please see License File for more information.