nextgen-solution / pigeon
此包已被废弃,不再维护。未建议替代包。
1.1
2019-08-06 10:02 UTC
Requires
- guzzlehttp/guzzle: ^6.3
This package is auto-updated.
Last update: 2020-04-06 11:35:16 UTC
README
安装
- 使用 composer 安装
composer require nextgen-solution/pigeon - 发布配置
php artisan vendor:publish - 更新您的 env
PIGEON_HOST= PIGEON_KEY= - 享受吧!
接口
/**
* Send an email to recipient via Pigeon's service.
*
* @param string $recipient
* @param string $template
* @param array $params
* @return array
*/
Pigeon::mail($recipient, $template, array $params = [])
/**
* Send a text to recipient via Pigeon's service.
*
* @param string $recipient
* @param string $template
* @param array $params
* @return array
*/
Pigeon::text($recipient, $template, array $params = [])
/**
* Request Pigeon to generate an OTP and send it via mail.
*
* @param string $recipient
* @param string $template
* @return array
*/
Pigeon::otpMail($recipient, $template)
/**
* Request Pigeon to generate an OTP and send it via text.
*
* @param string $recipient
* @param string $template
* @return array
*/
Pigeon::otpText($recipient, $template)
/**
* Verify user's OTP.
*
* @param string $recipient
* @param string $otp
* @param string $reference
* @return array
*/
Pigeon::otpVerify($recipient, $otp, $reference)