alhelwany/laravel-mtn
最新稳定版本:v1.0.2
Composer 安装命令:
composer require alhelwany/laravel-mtn
包简介
A simple Laravel notification Channel that utilizes MTN Syria services to send SMS
README 文档
README
A simple Laravel notification Channel that utilizes MTN Syria services to send SMS
Installation
You can install the package via composer:
composer require alhelwany/laravel-mtn
You can publish the config file with:
php artisan vendor:publish --tag="mtn-config"
This is the contents of the published config file:
return [ 'url' => env('MTN_GATEWAY_URL', 'https://services.mtnsyr.com:7443/General/MTNSERVICES/ConcatenatedSender.aspx'), 'username' => env('MTN_USERNAME', null), 'password' => env('MTN_PASSWORD', null), 'from' => env('MTN_FROM', null), ];
Usage
use Alhelwany\LaravelMtn\Enums\Lang; use Alhelwany\LaravelMtn\Interfaces\MTNNotification; use Illuminate\Notifications\Notification; use Alhelwany\LaravelMtn\Channels\MTNChannel; class MyNotification extends Notification implements MTNNotification { public function via(object $notifiable): array { return [MTNChannel::class]; } public function toText(): string { return "Hello"; } public function getLang(): Lang { return Lang::EN; } }
use Illuminate\Database\Eloquent\Model; use Alhelwany\LaravelMtn\Interfaces\MTNNotifiable; class User extends Model implements MTNNotifiable { public function getPhone(): string { return $this->phone; } }
$user->notify(new MyNotification);
Testing
composer test
Credits
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 16
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-08-14