Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/qferr/mjml-php
- Owner: qferr
- Created: 2020-04-02T16:45:22.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-06-16T19:32:56.000Z (7 months ago)
- Last Synced: 2024-10-20T09:18:21.586Z (3 months ago)
- Topics: email, mjml, mjml-api, php
- Language: PHP
- Homepage: https://qferrer.medium.com/rendering-mjml-in-php-982d703aa703
- Size: 55.7 KB
- Stars: 67
- Watchers: 1
- Forks: 9
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
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)