karabinse/telnect-sms
最新稳定版本:1.0.1
Composer 安装命令:
composer require karabinse/telnect-sms
包简介
Send SMS text message using Telnect API
README 文档
README
This package makes it easy to send notifications using [TelnectSms](link to service) with Laravel 10.x. Tested on PHP 8.4 and PHP 8.5.
This package provides a Laravel notification channel for sending SMS messages via the Telnect API. It integrates with Laravel's notification system, allowing you to send SMS notifications by adding the TelnectSms channel to your notifiable classes.
Contents
Installation
composer require karabinse/telnect-sms --update-with-dependencies
Setting up the TelnectSms service
You need to obtain an API key from Telnect. You can contact via this form
Add your Telnect API to services.php
<?php
return [
// ...
'telnect_sms' => [
'api_key' => env('TELNECT_SMS_API_KEY'),
],
];
Usage
Now you can use the channel in your via() method inside the notification:
<?php
use Karabin\TelnectSms\TelnectSmsChannel;
use Karabin\TelnectSms\TelnectSmsMessage;
use Illuminate\Notifications\Notification;
class AccountApproved extends Notification
{
public function via($notifiable)
{
return [SnsChannel::class];
}
public function toTelnectSms($notifiable)
{
return TelnectSmsMessage::create()
->body('Your account is created and ready to be used')
->sender('MyBusiness');
}
}
Testing
$ composer test
Security
If you discover any security related issues, please email info@karabin.se instead of using the issue tracker.
Contributing
Please see CONTRIBUTING for details.
Credits
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 16
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-05-06