PHPackages                             trezrayan/raygan-sms-notification-channel - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Mail &amp; Notifications](/categories/mail)
4. /
5. trezrayan/raygan-sms-notification-channel

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

trezrayan/raygan-sms-notification-channel
=========================================

Raygan SMS Channel for Laravel 5.3+

00PHP

Since Aug 12Pushed 2y ago1 watchersCompare

[ Source](https://github.com/TrezRayanCo/raygan-sms-notification-channel)[ Packagist](https://packagist.org/packages/trezrayan/raygan-sms-notification-channel)[ RSS](/packages/trezrayan-raygan-sms-notification-channel/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

This package makes it easy to send notifications using [RayganSms API](https://github.com/farhadmirzapour/RayganSms) with Laravel 5.3+.

RayganSms notifications channel for Laravel 5.3+
================================================

[](#raygansms-notifications-channel-for-laravel-53)

[![Latest Version on Packagist](https://camo.githubusercontent.com/dae916eae72605d61ad99ee34b74fb9226540173d02b87baa013a3faeab444a4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7472657a2f72617967616e2d736d732d6e6f74696669636174696f6e2d6368616e6e656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/trez/raygan-sms-notification-channel)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![StyleCI](https://camo.githubusercontent.com/2fa20411ec5c1988292d808b2758e55c631ee84f473da530a62b625de6d7b7e9/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3136343834383534332f736869656c643f6272616e63683d6d6173746572)](https://github.styleci.io/repos/164848543)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/dff70c3c21e421aa9c0de4c6a739c390ac87d3e3cfba953c7ac25f209ff1ae88/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6661726861646d69727a61706f75722f52617967616e736d734368616e6e656c2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/farhadmirzapour/RaygansmsChannel/?branch=master)[![Build Status](https://camo.githubusercontent.com/a2d4c8a49fda9b906b7b7bcb2b3f745f5c2dc73def74d45bf61dbee60884cf88/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6661726861646d69727a61706f75722f52617967616e736d734368616e6e656c2f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/farhadmirzapour/RaygansmsChannel/build-status/master)[![Code Intelligence Status](https://camo.githubusercontent.com/273a95732372292f45e6fdf6eb7175d4adf82ea70684a73f0728f248da510708/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6661726861646d69727a61706f75722f52617967616e736d734368616e6e656c2f6261646765732f636f64652d696e74656c6c6967656e63652e7376673f623d6d6173746572)](https://scrutinizer-ci.com/code-intelligence)[![Quality Score](https://camo.githubusercontent.com/604c60457ab2911ea7412c261ff846acdefbec36786da9d7e7d4b09a52c39fe7/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6661726861646d69727a61706f75722f52617967616e736d734368616e6e656c2e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/farhadmirzapour/RaygansmsChannel)[![Total Downloads](https://camo.githubusercontent.com/a243b4bd78a769e9d39db0ea8707d0fc721e78e9b597ff957e43321d432e9449/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7472657a2f72617967616e2d736d732d6e6f74696669636174696f6e2d6368616e6e656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/trez/raygan-sms-notification-channel)

این پکیج امکان ارسال اعلانات (notifications) را با استفاده از پکیج [RayganSms API](https://github.com/farhadmirzapour/RayganSms) فراهم می سازد. محتوا
-----

[](#محتوا)

- [نصب و پیکره بندی](#%D9%86%D8%B5%D8%A8-%D9%88-%D9%BE%DB%8C%DA%A9%D8%B1%D9%87-%D8%A8%D9%86%D8%AF%DB%8C)
- [نحوه استفاده](#%D9%86%D8%AD%D9%88%D9%87-%D8%A7%D8%B3%D8%AA%D9%81%D8%A7%D8%AF%D9%87)
- [تولیدکننده](#%D8%AA%D9%88%D9%84%DB%8C%D8%AF%DA%A9%D9%86%D9%86%D8%AF%D9%87)
- [لایسنس](#%D9%84%D8%A7%DB%8C%D8%B3%D9%86%D8%B3)

نصب و پیکره بندی
----------------

[](#نصب-و-پیکره-بندی)

با استفاده از composer قادر به نصب این سرویس می باشید:

```
composer require trezrayan/raygan-sms-notification-channel
```

توجه داشته باشید سرویس [RayganSms API](https://github.com/farhadmirzapour/RayganSms) به همراه این پکیج بصورت اتوماتیک بر روی پروژه شما نصب می شود. بنابراین چنانچه از قبل پکیج [RayganSms API](https://github.com/farhadmirzapour/RayganSms) بر روی پروژه شما نصب و تنظیمات مربوطه را انجام داده اید ، اقدامات مرتبط با نصب به پایان رسیده، در غیر این صورت مطابق مستندات مربوطه این پکیج ([پیکره بندی در لاراول](https://github.com/farhadmirzapour/RayganSms#%D9%BE%DB%8C%DA%A9%D8%B1%D9%87-%D8%A8%D9%86%D8%AF%DB%8C-%D8%AF%D8%B1-%D9%84%D8%A7%D8%B1%D8%A7%D9%88%D9%84))اقدام نمایید.

نحوه استفاده
------------

[](#نحوه-استفاده)

با استفاده از متد `()via` این کانال را به notefication خود اضافه نموده و متد toRayganSms را مطابق زیر جهت ارسال اعلان اضافه می نماییم:

```
use Illuminate\Notifications\Notification;
use NotificationChannels\RayganSms\RaygansmsChannel;
use NotificationChannels\RayganSms\TextMessage;
use NotificationChannels\RayganSms\AuthCodeMessage;

class AccountApproved extends Notification
{
    public function via($notifiable)
    {
        return [RayganSmsChannel::class];
    }

    public function toRayganSms($notifiable)
    {
        return (new TextMessage)
            ->content("your message to send ...");
    }
}
```

 جهت ارسال کد فعال سازی به کاربر می توان به صورت زیر عمل نمود :

```
...
    public function toRayganSms($notifiable)
    {
        return (new AuthCodeMessage)
                    ->content('Welcome');
    }
    ...
```

 و چنانچه بخواهیم کد فعال سازی دلخواه ارسال کنیم :

```
...
    public function toRayganSms($notifiable)
    {
        return (new AuthCodeMessage)
                    ->content('کد تایید شما : 325689')
                    ->autoGenerate(false);
    }
```

---

 **نکته:** جهت اطمینان از ارسال پیام به شماره کاربر، از مدل که معمولا مدل User می باشد جهت استخراج شماره تماس کاربر استفاده می نمایید، ابتدا trait زیر را به مدل خود اضافه نمائید :

```
    use Notifiable;
```

 سپس متد زیر را به مدل اضافه نمائید :

```
    public function routeNotificationForRayganSms()
    {
        return $this->phone_number;
    }
```

 توجه داشته باشید در این مدل ستون حاوی شماره تماس کاربر phone_number می باشد. در غیر اینصورت this-&gt;phone_number$ را مطابق با نام ستون حاوی شماره تماس کاربر تغییر دهید.

تولیدکننده
----------

[](#تولیدکننده)

- [Farhad Mirzapour](https://github.com/farhadmirzapour)

لایسنس
------

[](#لایسنس)

لایسنس این پکیج (MIT) می باشد . جهت اطلاعات در مورد این لایسنس به [License File](LICENSE) مراجعه نمایید.

###  Health Score

13

—

LowBetter than 1% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity22

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/416763?v=4)[trez](/maintainers/Trez)[@trez](https://github.com/trez)

---

Top Contributors

[![TrezRayanCo](https://avatars.githubusercontent.com/u/43716183?v=4)](https://github.com/TrezRayanCo "TrezRayanCo (3 commits)")

### Embed Badge

![Health badge](/badges/trezrayan-raygan-sms-notification-channel/health.svg)

```
[![Health](https://phpackages.com/badges/trezrayan-raygan-sms-notification-channel/health.svg)](https://phpackages.com/packages/trezrayan-raygan-sms-notification-channel)
```

###  Alternatives

[maize-tech/laravel-email-domain-rule

Laravel Email Domain Rule

612.0k](/packages/maize-tech-laravel-email-domain-rule)[sarfraznawaz2005/noty

Laravel package to incorporate noty flash notifications into laravel.

324.5k](/packages/sarfraznawaz2005-noty)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
