承接 webnuvola/laravel-mjml 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

webnuvola/laravel-mjml

最新稳定版本:v1.0.1

Composer 安装命令:

composer require webnuvola/laravel-mjml

包简介

Effortlessly craft responsive email templates using MJML within Laravel Mailables

README 文档

README

Latest Version on Packagist GitHub Tests Action Status Total Downloads

Effortlessly craft responsive email templates using MJML within Laravel Mailables.

To use this package, follow these steps after generating a new Mailable.
Instead of extending Illuminate\Mail\Mailable, extend Webnuvola\Laravel\Mjml\Mailable.
In the Mailable class, define the build method.
You can now use the mjml method for defining a view or mjmlContent to directly pass the MJML template.

Here's an example:

use Webnuvola\Laravel\Mjml\Mailable;

class TestMail extends Mailable
{
    /**
     * Build the message.
     */
    public function build(): void
    {
        $this->mjml('emails.orders.shipped', [
            'order' => $order,
        ]);
    }
}

Installation

You can install the package via composer:

composer require webnuvola/laravel-mjml

In your project, or on your server, you must have the JavaScript package mjml installed.

npm install mjml

Make sure you have installed Node 16 or higher.
This package uses spatie/mjml-php under the hood.

Testing

composer test

Changelog

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

Credits

Inspired by asahasrabuddhe/laravel-mjml package.

License

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

统计信息

  • 总下载量: 6.13k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-07-03