Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/qferr/mjml-php

A simple PHP library to render MJML to HTML.
https://github.com/qferr/mjml-php

email mjml mjml-api php

Last synced: 3 months ago
JSON representation

A simple PHP library to render MJML to HTML.

Awesome Lists containing this project

README

        

MJML in PHP
===========

![PHPUnit](https://github.com/qferr/mjml-php/actions/workflows/php.yml/badge.svg)

A simple PHP library to render MJML to HTML.

There are two ways for integrating MJML in PHP:
* using the MJML API
* using the MJML library

### Installation

```shell script
composer require qferr/mjml-php
```

### Using MJML library

Install the MJML library:

```shell script
npm install mjml --save
```

If you want a specific version, use the following syntax: `npm install [email protected] --save`

```php
render('




Hello world




');
```

### Using MJML API

```php
render('




Hello world




');
```

You can get the version of MJML used by the API to transpile:

```php
$api->getMjmlVersion();
```

More details in the API documentation: [https://mjml.io/api/documentation](https://mjml.io/api/documentation)