Download the PHP package maize-tech/laravel-mjml without Composer

On this page you can find all versions of the php package maize-tech/laravel-mjml. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-mjml

Laravel MJML

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

Laravel MJML lets you write responsive HTML emails with MJML directly inside your Blade templates. Any view named *.mjml.blade.php is first compiled by the Blade engine and then converted to production-ready, email-client-safe HTML, so you keep the full power of Blade (components, slots, directives, localization) while authoring with MJML's concise, responsive syntax.

The package registers a dedicated mjml view engine, ships a set of ready-to-use Blade email components and a notification-friendly MailMessage, and supports three conversion backends out of the box: a local Node renderer (default), the hosted MJML API, or your own custom action.

Installation

You can install the package via composer:

You can publish the config file and the views with the install command:

This is the contents of the published config file:

Usage

Conversion modes

The mode config option determines how MJML markup is turned into HTML.

ConversionMode::Node (the default) renders MJML locally through spatie/mjml-php, which relies on the mjml Node binary:

ConversionMode::API sends the MJML markup to the hosted MJML API and requires the following environment variables:

ConversionMode::Custom lets you provide your own invokable action. It receives the compiled MJML string and must return the rendered HTML:

Notifications

Use the package's MailMessage inside a notification's toMail method to render the notification with MJML instead of the default Laravel mail template. It extends Laravel's MailMessage, so the familiar fluent API (greeting, line, action, salutation, ...) keeps working:

Custom MJML views

Any view whose name ends with .mjml.blade.php is automatically compiled by Blade and converted to HTML. You can use it like any other Blade view — for example as a mailable view:

Blade components

When you publish the views, a set of x-mjml::* Blade components becomes available to help you build consistent, well-styled emails:

Component Description Notable props
x-mjml::layout Full email scaffold with header, body, optional subcopy and footer slots.
x-mjml::message Notification-style body: greeting, intro/outro lines, action button and salutation.
x-mjml::header Top section rendering the application name (or the Laravel logo). url
x-mjml::footer Centered footer text (Markdown supported).
x-mjml::button Call-to-action button. url, color (default #2d3748), align (default center)
x-mjml::line A line of text with Markdown parsing.
x-mjml::panel Highlighted panel with a left border.
x-mjml::subcopy Secondary text separated by a divider.

Example:

Testing

Changelog

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

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

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


All versions of laravel-mjml with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
illuminate/contracts Version ^11.0||^12.0||^13.0
spatie/laravel-package-tools Version ^1.16.6
spatie/mjml-php Version ^1.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package maize-tech/laravel-mjml contains the following files

Loading the files please wait ...