定制 solution-forest/filament-unlayer 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

solution-forest/filament-unlayer

Composer 安装命令:

composer require solution-forest/filament-unlayer

包简介

This is my package filament-unlayer

README 文档

README

Filament Unlayer

Latest Version on Packagist Total Downloads

Filament Unlayer is a custom field package designed for Filaletter, the Filament Newsletter plugin. It enables rich, drag-and-drop email template editing within your FilamentPHP admin panel, powered by the Unlayer editor.

With Filament Unlayer, you can:

  • Build and edit email templates visually with Unlayer’s intuitive interface
  • Store both the HTML and JSON design data for each template
  • Reuse, duplicate, and manage templates for different campaigns or use cases
  • Integrate seamlessly as a custom field in any FilamentPHP resource or form
  • Export clean, production-ready HTML for sending with your preferred email service
  • Customize the Unlayer editor’s appearance and options to fit your workflow

Features

  • Drag-and-drop email builder: Integrates Unlayer for visual email design.
  • Saves both HTML and JSON design data: Store and reuse templates flexibly.
  • Easy integration: Use as a custom field in your Filament forms.
  • Export HTML: Easily extract the generated HTML for sending.

Installation

Filament Version Filament Newsletter Version
v3.x v0.x
v4.x v2.x
v5.x >= v2.0.7

Install via Composer:

composer require solution-forest/filament-unlayer
php artisan filament:assets

Publish the config file (optional):

php artisan vendor:publish --tag="filament-unlayer-config"

Publish the views (optional):

php artisan vendor:publish --tag="filament-unlayer-views"

Usage

1. Prepare Your Database

First, ensure your table has a json column to store the Unlayer design and HTML. For example, in a migration:

$table->json('content');

2. Add the Unlayer Field to Your Filament Form

Add the Unlayer field to your resource or form:

use SolutionForest\FilamentUnlayer\FilamentUnlayer;

FilamentUnlayer::make('content');

This field will save both the HTML and the Unlayer design JSON into your content column.

3. Exporting HTML

If you want to store only the HTML in a separate field, you can mount the HTML state to another field:

FilamentUnlayer::make('json-content')->mountHtmlStateTo('data.content');

Hidden::make('content');

Or, extract the HTML from the field data before saving:

protected function mutateFormDataBeforeSave(array $data): array
{
    $data['content'] = $data['json-content']['html'];
    return $data;
}

Testing

composer test

Changelog

See CHANGELOG for recent updates.

Contributing

See CONTRIBUTING for details.

Security

See security policy for reporting vulnerabilities.

Credits

License

MIT. See License File for details.

solution-forest/filament-unlayer 适用场景与选型建议

solution-forest/filament-unlayer 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 571 次下载、GitHub Stars 达 3, 最近一次更新时间为 2024 年 11 月 08 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「laravel」 「solution-forest」 「filament-unlayer」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 solution-forest/filament-unlayer 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 solution-forest/filament-unlayer 我们能提供哪些服务?
定制开发 / 二次开发

基于 solution-forest/filament-unlayer 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 571
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 16
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-11-08