lelevar/sms
Composer 安装命令:
composer require lelevar/sms
包简介
Lelevar SMS Package for Laravel simplifies SMS sending via the Lelevar SMS API. It supports single and bulk SMS messaging with easy API key configuration, optional facades, and a helper function for quick integration. Ideal for integrating SMS into Laravel apps effortlessly.
README 文档
README
The Lelevar SMS Package is a Laravel package for sending SMS messages via the Lelevar SMS API (https://sms.lelevar.com). This package simplifies SMS sending functionality in your Laravel application.
Features
- Send single SMS messages
- Send multiple SMS messages
- Easy integration with Laravel
- Support for API key configuration
Installation
Via Composer
Install the package via Composer by running the following command in your Laravel project directory:
composer require lelevar/sms
Service Provider
If you are using Laravel 5.5 or later, the package will automatically be discovered. If you are using an earlier version of Laravel, you need to manually add the service provider to your config/app.php:
'providers' => [ // Other service providers... Lelevar\Sms\SmsServiceProvider::class, ],
Facades (Optional)
For easier access to the package's functionality, you can add facades to your config/app.php:
'aliases' => [ // Other aliases... 'SmsService' => Lelevar\Sms\Facades\SmsService::class, ],
Configuration
The package uses an API key for authentication. Set your API key in your .env file:
LELEVAR_SMS_API_KEY=your_api_key_here LELEVAR_SMS_SENDER_NAME=your_sender_name_here
Usage
Sending a Single SMS
You can send a single SMS message using the LelevarSendSms helper function:
use Lelevar\Sms\Facades\SmsService; $response = LelevarSendSms([ 'mobile' => '**********', 'content' => 'Hello World!', 'sender_name' => '*******', ]); dd($response);
License
This package is licensed under the MIT License.
lelevar/sms 适用场景与选型建议
lelevar/sms 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 24 次下载、GitHub Stars 达 0, 最近一次更新时间为 2024 年 08 月 22 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 lelevar/sms 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 lelevar/sms 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 24
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 9
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-08-22