Zenziva SMS notifications driver.
daemon144key/zenziva-notification-channel is a Laravel package for zenziva sms notifications driver..
It currently has 2 GitHub stars and 4.173 downloads on Packagist (latest version 1.0.0).
Install it with composer require daemon144key/zenziva-notification-channel.
Discover more Laravel packages by daemon144key
or browse all Laravel packages to compare alternatives.
Last updated
This package makes it easy to send SMS notifications using zenziva.id with Laravel 5.3 onward.
You can install the package via composer:
composer require daemon144key/zenziva-notification-channel
You must install the service provider and add to your config/app.php (skip for Laravel 5.5 onward):
// config/app.php
'providers' => [
...
TuxDaemon\ZenzivaNotificationChannel\ZenzivaServiceProvider::class,
],
Additionally you can add related facade in config/app.php :
// config/app.php
'aliases' => [
...
'ZenzivaClient' => TuxDaemon\ZenzivaNotificationChannel\Facades\ZenzivaFacade::class,
],
Add your Zenziva account userkey and passkeyto your config/services.php:
// config/services.php
...
'zenziva' => [
'userkey' => env('ZENZIVA_SMS_CLIENT_USERKEY', ''),
'passkey' => env('ZENZIVA_SMS_CLIENT_PASSKEY', ''),
'masking' => env('ZENZIVA_SMS_CLIENT_MASKING', false)
],
...
You can use the channel in your via() method inside the notification:
use Illuminate\Notifications\Notification;
use TuxDaemon\ZenzivaNotificationChannel\ZenzivaMessage;
use TuxDaemon\ZenzivaNotificationChannel\ZenzivaChannel;
class OrderCreated extends Notification
{
public function via($notifiable)
{
return [ZenzivaChannel::class];
}
public function toZenziva($notifiable)
{
return ZenzivaMessage::create("Your order had created!");
}
}
Or call the function from facade :
use ZenzivaClient;
class Something
{
public function send($to, $msg)
{
return ZenzivaClient::send("081234567890", "hello world");
}
public function checkBalance()
{
return ZenzivaClient::checkBalance();
}
}
Or from CLI artisan command :
$ php artisan zenziva:send 081234567890 "hello world"
$ php artisan zenziva:checkbalance
Please see CHANGELOG for more information what has changed recently.
$ composer test
If you discover any security related issues, please use the issue tracker.
Please see CONTRIBUTING for details.
The MIT License (MIT). Please see License File for more information.