novinvision/iranian-laravel-sms 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-09-23