mlk9/ippanel-laravel
Composer 安装命令:
composer require mlk9/ippanel-laravel
包简介
Send SMS notification based on channel Laravel (Ippanel SMS service)
README 文档
README
پکیج لاراولی ارسال اس ام اس سازگار با نوتیفیکیشن برای آپی پنل
نیازمندی ها
- لاراول 6+
- PHP 7.4+
ویژگی ها
- سریع و ساده
- اتصال امن
- سازگار با نوتیفیکیشن
نصب
نصب پکیج به وسیله کامپوزر:
composer require mlk9/ippanel-laravel
عمومی کردن تنظیمات
php artisan vendor:publish --tag=ippanel-laravel
جزئیات دقیق کانفیگ
// config/services.php 'ippanel' => [ 'server' => 'https://ippanel.com/services.jspd', 'username' => 'YOUR_IPPANEL_USERNAME', 'password' => 'YOUR_IPPANEL_PASSWORD', 'originator' => 'YOUR_IPPANEL_ORIGINATOR', ],
استفاده
با استفاده از فساد
<?php
use Mlk9\Sms\Facades\Sms;
//get credit
Sms::getCredit(); // res : 933222.33
//send message
Sms::sendMessage(string $text,array|string $recipients); // bool
//send pattern message
Sms::sendPatternMessage(string $code_pattern,string $recipient,array $entries = []);// bool
با استفاده از نوتیفیکیشن لاراول
افزودن 'sms' به نوتیفیکیشن مد نظر
و ایجاد فانکشن toSms به این شکل :
class ExampleNotification extends Notification
{
/**
* Get the notification's delivery channels.
*
* @param mixed $notifiable
* @return array
*/
public function via($notifiable)
{
return ['sms'];
}
//for pattern sms
public function toSms($notifiable)
{
return [
'type' => 'patternMessage',
'code' => 'YOUR CODE PATTERN',//string
'values' => ['name'=>$notifiable->name],//array
'recipient'=> $notifiable->phone,//string
];
}
//for simple sms
// public function toSms($notifiable)
// {
// return [
// 'type' => 'message',
// 'message' => 'YOUR MESSAGE',
// 'recipient'=> [$notifiable->phone], // shoud be arrray
// ];
// }
mlk9/ippanel-laravel 适用场景与选型建议
mlk9/ippanel-laravel 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 728 次下载、GitHub Stars 达 0, 最近一次更新时间为 2021 年 09 月 09 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 mlk9/ippanel-laravel 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 mlk9/ippanel-laravel 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 728
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-09-09