toyosi12/laravel-plunk
Composer 安装命令:
composer require toyosi12/laravel-plunk
包简介
Plunk is the afforable, developer-friendly email platform that brings together marketing, transactional and broadbase emails into one single, complete solution
README 文档
README
A laravel package to easily integrate plunk
Installation
PHP 7.2+ and Composer are required.
To get the latest version of Laravel Plunk, simply require it
composer require toyosi12/laravel-plunk
Once installed, the package automatically registers its service provider and facade.
Usage
1. Update your environment file with your secret key as described below.
PLUNK_SECRET_KEY="<SECRET_KEY>"
Login to your Plunk dashboard to obtain your secret key.
2. Make a call to the method you need.
use Toyosi12\Plunk\Facades\Plunk; Plunk::countContacts();
References
Events
- triggerEvent() Used to publish an event
Parameters
- event: The name of the event to publish
- email: The email address of the user to publish the event to
- data [Optional]: An object containing the data to attach to the user
Sample request:
use Toyosi12\Plunk\Facades\Plunk; $request = { "event": "test-project", "email": "toyosi@nomail.com" } Plunk::triggerEvent($request);
Emails
- sendTransactionalEmail() Used to send transactional email
Parameters
- to: The email address of the recipient
- subject: The subject of the email
- body: The body of the email
- type [Optional]: The type of email to send (html or markdown)
- from [Optional]: The email address of the sender
- name [Optional]: The name of the sender
- withUnsubscribe [Optional]: Whether to include an unsubscribe link hosted by Plunk in the email
Sample request:
use Toyosi12\Plunk\Facades\Plunk; $request = { "to": "toyosi@nomail.com", "subject": "Test Plunk", "body": "Testing plunk" } Plunk::sendTransactionalEmail($request);
Contributing
Do feel free to fork this repo and contribute by submitting a pull request. Let's make it better.
Star
I'd love you to star this repo. Also follow me on twitter
License
The MIT License (MIT). Please see License File for more information.
toyosi12/laravel-plunk 适用场景与选型建议
toyosi12/laravel-plunk 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 11 次下载、GitHub Stars 达 4, 最近一次更新时间为 2023 年 06 月 29 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 toyosi12/laravel-plunk 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 toyosi12/laravel-plunk 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 11
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 14
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-06-29