PHPackages                             irajtaghlidi/laravel-asanak-sms - 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. irajtaghlidi/laravel-asanak-sms

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

irajtaghlidi/laravel-asanak-sms
===============================

Asanak.com Notifications channel for Laravel 5.3+

1.0.3(7y ago)2361MITPHPPHP ^7.2

Since Jul 10Pushed 7y ago1 watchersCompare

[ Source](https://github.com/irajtaghlidi/laravel-asanak-sms)[ Packagist](https://packagist.org/packages/irajtaghlidi/laravel-asanak-sms)[ Docs](https://github.com/irajtaghlidi/laravel-asanak-sms)[ RSS](/packages/irajtaghlidi-laravel-asanak-sms/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (6)Versions (3)Used By (0)

Asanak notifications channel for Laravel 5.3+
=============================================

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

[![Latest Version on Packagist](https://camo.githubusercontent.com/99fa3b82e4f17335231aa5addca0db18c081a1b8ecb2cb1a70210e0b126c9241/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6972616a746167686c6964692f6c61726176656c2d6173616e616b2d736d732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/irajtaghlidi/laravel-asanak-sms)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/95fc009502030c92ad19e71ebe8fde36dece3d334c7e68a191bfed5d72c7e7da/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6972616a746167686c6964692f6c61726176656c2d6173616e616b2d736d732f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/irajtaghlidi/laravel-asanak-sms)[![StyleCI](https://camo.githubusercontent.com/0cc40f91817704dc8a790e86f9121777e293ae2c3e748db68c894eba156c4964/68747470733a2f2f7374796c6563692e696f2f7265706f732f36353538393435312f736869656c64)](https://styleci.io/repos/65589451)[![SensioLabsInsight](https://camo.githubusercontent.com/8bf7b10fb398541d8adce86003f2fa8aadd3c5de6cae0c9e84ce878e4234f3e9/68747470733a2f2f696d672e736869656c64732e696f2f73656e73696f6c6162732f692f61636565666532372d626135612d343964372d393036342d6263336162656130616265622e7376673f7374796c653d666c61742d737175617265)](https://insight.sensiolabs.com/projects/aceefe27-ba5a-49d7-9064-bc3abea0abeb)[![Quality Score](https://camo.githubusercontent.com/5a51ecb07c8c408263e988493b963d029e4517435df6f1917ff1effc0dc5eeb7/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6972616a746167686c6964692f6c61726176656c2d6173616e616b2d736d732e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/irajtaghlidi/laravel-asanak-sms)[![Code Coverage](https://camo.githubusercontent.com/6a990b0b998f9332ef429fc16f7ac1abcd80ad53f825ff1d9fd8be4ed6678341/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f6972616a746167686c6964692f6c61726176656c2d6173616e616b2d736d732f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/irajtaghlidi/laravel-asanak-sms/?branch=master)[![Total Downloads](https://camo.githubusercontent.com/c7bfe0bbd17bce8c244e216b9fe2ce3a6e1902f56c4ee372ba7361f9d394ba5c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6972616a746167686c6964692f6c61726176656c2d6173616e616b2d736d732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/irajtaghlidi/laravel-asanak-sms)

This package makes it easy to send notifications using [asanak.com](//asanak.com) with Laravel 5.3+.

- You can use Queue with Redis to speed up your application.

Contents
--------

[](#contents)

- [Installation](#installation)
    - [Setting up the AsanakSms service](#setting-up-the-AsanakSms-service)
- [Usage](#usage)
    - [Available Message methods](#available-message-methods)
- [Changelog](#changelog)
- [Testing](#testing)
- [Security](#security)
- [Credits](#credits)
- [License](#license)

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require irajtaghlidi/laravel-asanak-sms
```

Then you must install the service provider:

```
// config/app.php
'providers' => [
    ...
    NotificationChannels\AsanakSms\AsanakSmsServiceProvider::class,
],
```

### Setting up the AsanakSms service

[](#setting-up-the-asanaksms-service)

Add your AsanakSms login, username/password and default sender number to your `config/services.php`:

```
// config/services.php
...
'asanaksms' => [
    'username' => env('ASANAK_USERNAME'),
    'password' => env('ASANAK_PASSWORD'),
    'from'     => env('ASANAK_FROM'),
    'apiurl'   => env('ASANAK_APIURL'),
],
...
```

Usage
-----

[](#usage)

You can use the channel in your `via()` method inside the notification:

```
use Illuminate\Notifications\Notification;
use NotificationChannels\AsanakSms\AsanakSmsMessage;
use NotificationChannels\AsanakSms\AsanakSmsChannel;

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

    public function toAsanakSms($notifiable)
    {
        return AsanakSmsMessage::create("Task #{$notifiable->id} is complete!");
    }
}
```

You can add a alias to `config/app.php` :

```
// config/app.php
'aliases' => [
    ...
    'asanaksms' => NotificationChannels\AsanakSms\AsanakSmsChannel::class,
],
```

You can use alias instead of class name in `via()` method:

```
use Illuminate\Notifications\Notification;
use NotificationChannels\AsanakSms\AsanakSmsMessage;

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

    public function toAsanakSms($notifiable)
    {
        return AsanakSmsMessage::create("Task #{$notifiable->id} is complete!");
    }
}
```

In your notifiable model (for example App/User Model), make sure to include a `routeNotificationForAsanaksms()` method, which returns a phone number or an array of phone numbers.

```
public function routeNotificationForAsanaksms()
{
    return $this->phone;
}
```

### Available methods

[](#available-methods)

`from()`: Sets the sender's phone number.

`content()`: Set a content of the notification message.

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Credits
-------

[](#credits)

- [Iraj Taghlidi](https://github.com/irajtaghlidi)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Every ~258 days

Total

2

Last Release

2606d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7e550b18e5ce1b63faa84167ffe8c7e7e8a44f4094ce960b991992de33667ad6?d=identicon)[irajtaghlidi](/maintainers/irajtaghlidi)

---

Top Contributors

[![irajtaghlidi](https://avatars.githubusercontent.com/u/785830?v=4)](https://github.com/irajtaghlidi "irajtaghlidi (16 commits)")

---

Tags

laravelnotificationssmsasanak.com

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/irajtaghlidi-laravel-asanak-sms/health.svg)

```
[![Health](https://phpackages.com/badges/irajtaghlidi-laravel-asanak-sms/health.svg)](https://phpackages.com/packages/irajtaghlidi-laravel-asanak-sms)
```

###  Alternatives

[laravel-notification-channels/twilio

Provides Twilio notification channel for Laravel

2587.7M12](/packages/laravel-notification-channels-twilio)[laravel-notification-channels/discord

Laravel notification driver for Discord.

2371.3M11](/packages/laravel-notification-channels-discord)[s-ichikawa/laravel-sendgrid-driver

This library adds a 'sendgrid' mail driver to Laravel.

4139.3M1](/packages/s-ichikawa-laravel-sendgrid-driver)[benwilkins/laravel-fcm-notification

Laravel FCM (Firebase Cloud Messaging) Notification Channel

210964.1k1](/packages/benwilkins-laravel-fcm-notification)[tzsk/sms

A robust and unified SMS gateway integration package for Laravel, supporting multiple providers.

320244.3k6](/packages/tzsk-sms)[ghanem/laravel-smsmisr

Send SMS and SMS Notification via SMS Misr for Laravel

194.8k](/packages/ghanem-laravel-smsmisr)

PHPackages © 2026

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