ihabrouk/email_templates
Composer 安装命令:
composer require ihabrouk/email_templates
包简介
Email Templates Management Plugin for FilamentPHP
README 文档
README
A FilamentPHP plugin for managing email templates in Laravel applications.
Introduction
Email Templates provides an intuitive interface for creating, editing, and managing email templates directly within the FilamentPHP admin panel. This allows content managers and developers to easily customize email notifications without touching code.
Features
- Powerful WYSIWYG editor for creating rich email templates
- Variable support for dynamic content
- Template previewing functionality
- Easy integration with Laravel Mail
- Filament-native interface
Requirements
- PHP 8.3+
- Laravel 10+
- FilamentPHP 3.3+
Installation
You can install the package via composer:
composer require ihabrouk/email_templates
After installation, publish the migrations:
php artisan vendor:publish --tag="email-templates-migrations"
php artisan migrate
You can optionally publish the config file:
php artisan vendor:publish --tag="email-templates-config"
Usage
Accessing Email Templates
Once installed, you'll see an "Email Templates" item in your Filament navigation panel.
Creating a Template
- Navigate to Email Templates in the Filament admin panel
- Click "New Template"
- Fill in the template details:
- Name: A descriptive name for your template
- Subject: The email subject line
- Body: The content of your email
Using Variables
You can use variables in your templates with double curly braces:
Hello {{ $user->name }},
Thank you for your order #{{ $order->id }}.
Sending Emails with Templates
use Ihabrouk\EmailTemplates\Services\EmailSender; // Using the template name EmailSender::send('welcome-email', [ 'user' => $user, 'company' => $company ], 'user@example.com'); // Or using the template ID EmailSender::sendById(1, [ 'user' => $user, 'company' => $company ], 'user@example.com');
Customization
Custom Template Variables
You can define your own variables and their sample values by publishing the config file and updating the variables section.
Contributing
Contributions are welcome and will be fully credited.
License
The MIT License (MIT). Please see License File for more information.
ihabrouk/email_templates 适用场景与选型建议
ihabrouk/email_templates 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 03 月 30 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 ihabrouk/email_templates 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 ihabrouk/email_templates 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 2
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 11
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-03-30