Skip to content

Enjaz Sms service provider wrapper with notification channel support

License

Notifications You must be signed in to change notification settings

hsmfawaz/enjaz-sms

Repository files navigation

enjaz-sms

Software License Travis Total Downloads

Install

composer require hsmfawaz/enjaz-sms

Configuration

Follow the following instructions to install the package successfully

.env

ENJAZ_USERNAME='XXX'
ENJAZ_PASSWORD='XXX'
ENJAZ_SENDER='XXX'

if you want to publish the config

php artisan vendor:publish --provider="HsmFawaz\EnjazSms\EnjazSmsServiceProvider" 
--tag="config"

Usage

You can use the class to send directly

use \Hsmfawaz\EnjazSms\EnjazSms;

$client = new EnjazSms();
$result = $client->to(['+9665XXXXXXX','9665XXXXXXX'])->send('Your message here');
//you will get array from parsed request body

or you can use the channel for notifications support

//Example app/Notifications/RecoveryCodeNotification.php
use \Hsmfawaz\EnjazSms\EnjazSmsChannel;

public function via($notifiable)
    {
        return [EnjazSmsChannel::class];
    }

public function toEnjazSms($notifiable)
    {
        return [
            'phone' => 'phone number',
            'body' =>'message',
        ];
    }

Contributing

Please see CONTRIBUTING for details.

Security

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

License

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

About

Enjaz Sms service provider wrapper with notification channel support

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages