Skip to content

velostazione/laravel-besms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BeSMS Notifications Channel

Latest Version on Packagist Total Downloads PHP 8.0.10 Laravel 8

BeSMS Notifications Channel for Laravel

Installation

composer require velostazione/laravel-besms

Add the configuration to your .env file:

BESMS_USERNAME=
BESMS_PASSWORD=
BESMS_API_ID=
BESMS_REPORT_TYPE= # Default: C
BESMS_SENDER= # Default: null

Usage

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

use Illuminate\Notifications\Notification;
use \Velostazione\Laravel\BeSMSChannel;

class YourNotification extends Notification
{
    public function via($notifiable): array
    {
        return [BeSMSChannel::class];
    }

    public function toBeSMS($notifiable): BeSMSMessage
    {
        $message = new BeSMSMessage();
        $message->content("Hello {$notifiable->name}!");
        $message->sender("Me");
        return $message;
    }
}

About

BeSMS Laravel Notification Channel

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages