Sparrow SMS Notification Channel for laravel.
sushantaryal/sparrow-notification-channel is a Laravel package for sparrow sms notification channel for laravel..
It currently has 0 GitHub stars and 4 downloads on Packagist (latest version 1.1.2).
Install it with composer require sushantaryal/sparrow-notification-channel.
Discover more Laravel packages by sushantaryal
or browse all Laravel packages to compare alternatives.
Last updated
You can install the package via Composer:
$ composer require sushantaryal/sparrow-notification-channel
Add your Sparrow Token, and From identity to your .env:
SPARROW_SMS_TOKEN=ABCD #always required
SPARROW_SMS_FROM=identity #always required
Run
php artisan vendor:publish --provider="Sushant\SparrowSmsNotification\SparrowSmsServiceProvider"
/config/sparrow-sms.php
Now you can use the channel in your via() method inside the notification:
use Illuminate\Notifications\Notification;
use Sushant\SparrowSmsNotification\SparrowMessage;
class VerifyOtp extends Notification
{
public function via($notifiable)
{
return ['sparrowsms'];
}
public function toSparrowSms($notifiable)
{
return (new SparrowMessage)
->content('Your OTP code is 12345.');
}
}
from(''): Accepts a identity provided to you.content(''): Accepts a string value for the notification body.configuration.Sparrow SMS notifications channel is open-sourced software licensed under the MIT license.