This package makes it easy to send notifications using []( (aka SMSRU) with Laravel 5.5+

1.3.0 2021-07-07 09:01 UTC

This package is auto-updated.

Last update: 2022-09-04 13:38:01 UTC


Here's the latest documentation on Laravel's Notifications System:

Latest Version on Packagist Software License Build Status StyleCI SensioLabsInsight Quality Score Code Coverage Total Downloads

This package makes it easy to send notifications using (aka SMSRU) with Laravel 5.5+.



Install this package with Composer:

composer require fomvasss/laravel-notification-channel-sms-ru

The service provider gets loaded automatically. Or you can do this manually:

// config/app.php
'providers' => [

Setting up the SmsRu service

Add your SmsRu apiID, default sender name (or phone number) to your config/services.php:

// config/services.php
'sms_ru' => [
    'api_id'  => env('SMSRU_API_ID'),


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

use Illuminate\Notifications\Notification;
use NotificationChannels\SmsRu\SmsRuMessage;
use NotificationChannels\SmsRu\SmsRuChannel;

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

    public function toSmsru($notifiable)
        return (new SmsRuMessage())->content("Hello SMS!!!")->test(true)->translit(false);

In your notifiable model, make sure to include a routeNotificationForSmsru() method, which returns a phone number or an array of phone numbers.

public function routeNotificationForSmsru()
    return $this->phone;

Available methods

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

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

time(): Example argument = time() + 7*60*60 - Postpone shipping for 7 hours.

translit(): Text transliteration

test(): Test SMS sending (free)

from(): Approved letter sender

parentId(): You can specify your partner ID if you integrate the code into a foreign system


Please see CHANGELOG for more information what has changed recently.


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


Please see CONTRIBUTING for details.



The MIT License (MIT). Please see License File for more information.