novinvision/iranian-laravel-sms
最新稳定版本:v1.0.2
Composer 安装命令:
composer require novinvision/iranian-laravel-sms
包简介
A laravel package for send sms notification with iranian sms providers like ippanel, sms.ir, kavenegar, mellipaymak, ...
关键字:
README 文档
README
# Laravel SMS Notification Channel This package provides a **custom SMS notification channel** for Laravel, built on top of [tzsk/sms](https://github.com/tzsk/sms). --- ## Installation ```bash composer require novinvision/iranian-laravel-sms ``` Publish the config file ```bash $ php artisan sms:publish ``` --- ## Usage ### Create a Notification ```php <?php namespace App\Notifications; use NovinVision\IranianLaravelSMS\Messages\SmsMessage; use Illuminate\Notifications\Notification; class SmsTest extends Notification { public function via($notifiable) { return ['sms']; } public function toSms(object $notifiable): SmsMessage { return (new SmsMessage) ->line(sprintf("Dear %s", $notifiable->name)) ->line("It is Test Sms Message"); } } ``` ### Add Route to User Model ```php public function routeNotificationForSms(): ?string { return $this->mobile; } ``` ### Send the Notification ```php $user->notify(new \App\Notifications\SmsTest()); ``` --- ## License MIT
统计信息
- 总下载量: 2
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-09-23