sebastienheyd/boilerplate-email-editor
Composer 安装命令:
composer require sebastienheyd/boilerplate-email-editor
包简介
E-mail visual editor for sebastienheyd/boilerplate
README 文档
README
This package for sebastienheyd/boilerplate allows developers to manage
emails for their applications. It allows you to create layouts and then define editors who will only be able to edit
texts without being able to modify the layouts.
Installation
- In order to install Laravel Boilerplate Email Editor run :
composer require sebastienheyd/boilerplate-email-editor
- Then run :
php artisan migrate
You can go to the admin and start using the email management panel.
Optional : publish configuration file
php artisan vendor:publish --tag=email-editor-config
Modify the default HTML layout
To edit the default HTML layout, you can use the following command
php artisan vendor:publish --tag=email-editor-layout
You will find the layout in /resources/views/vendor/boilerplate-email-editor/layout
Generating a new email layout
To generate a new layout, you can use the following artisan command :
php artisan email:layout {name}
This command will generate a new blade file in the resources/views/email-layouts folder.
To change the default folder, change the value of layouts_path in the email-editor configuration file.
However, you must publish the configuration file in order to do so. To do this, use the following command:
php artisan vendor:publish --tag=email-editor-config
You can also remove a layout by using the --remove option
php artisan email:layout --remove {name}
Defining editors
This package is provided with two permissions that can be used depending on the desired profile.
- Email development : to be reserved for developers, it allows to define the slug, the description and the layout.
- Email edition : for users who will be able to edit the content of emails.
Permissions and roles are manageable by default with sebastienheyd/boilerplate
Email variables
In the editing of the content of an e-mail, you will find a "Insert a variable" button. This button allows you to insert a variable in the e-mail and make it uneditable.
However, you can also enter the variables by hand by framing them with [ and ]. In this manner, you can also add variables to the subject line of the email.
Example : "Hello [first_name]"
Sending an email
use Sebastienheyd\BoilerplateEmailEditor\Models\Email; // Setting data $data = ['first_name' => 'John', 'last_name' => 'Doe']; // Sending email by his slug Email::findBySlug('my_slug')->send('email@tld.com', $data); // Or by his id Email::find(1)->send('email@tld.com', $data);
Tests / Coding standards
This package is delivered with a Makefile used to launch checks for the respect of coding standards and the unit tests
Just call make to see the list of commands.
Credits
License
This package is free software distributed under the terms of the MIT license.
sebastienheyd/boilerplate-email-editor 适用场景与选型建议
sebastienheyd/boilerplate-email-editor 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 498 次下载、GitHub Stars 达 3, 最近一次更新时间为 2019 年 02 月 15 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「mail」 「email」 「boilerplate」 「editor」 「laravel」 「e-mail」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 sebastienheyd/boilerplate-email-editor 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 sebastienheyd/boilerplate-email-editor 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 sebastienheyd/boilerplate-email-editor 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
PHP class to extend when building a WordPress plugin allowing you to follow smart plugin setup standards.
Anax htmlform module.
Courier offers a convenient and painless solution for creating emails tailored for your Kirby website.
Laravel 5.7 Boilerplate based on Bootstrap 4 and Tabler for Backend.
Mail libraries used by Zimbra Api
Extensible library for building notifications and sending them via different delivery channels.
统计信息
- 总下载量: 498
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 13
- 依赖项目数: 0
- 推荐数: 2
其他信息
- 授权协议: MIT
- 更新时间: 2019-02-15