Skip to content

Latest commit

 

History

History
120 lines (87 loc) · 4.06 KB

README.md

File metadata and controls

120 lines (87 loc) · 4.06 KB

Use this repo as a skeleton for your new channel, once you're done please submit a Pull Request on this repo with all the files.

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

https://laravel.com/docs/master/notifications

NetCore notifications channel for Laravel 5.3 and above.

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 [NetCoreSMS](link to service) with Laravel 5.3.

Contents

Requirements

  • Sign up for a Netcore account
  • After registration you will get feed_id, username and password

Installation

You can install the package via composer:

composer require laravel-notification-channels/netcoresms

You must install the service provider:

// config/app.php
'providers' => [
    ...
    NotificationChannels\NetCoreSms\NetCoreServiceProvider::class,
],

Setting up the NetCoreSMS service

Add the environment variables to your config/services.php:

// config/services.php
...
'netcore' => [
    'feed_id' => env('NETCORE_FEED_ID'),
    'username' => env('NETCORE_USERNAME'),
    'password' => env('NETCORE_PASSWORD'),
],
...

Usage

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

Available Message methods

use Illuminate\Notifications\Notification;
use NotificationChannels\NetCoreSms\NetCoreChannel;
use NotificationChannels\NetCoreSms\NetCoreMessage;

class VpsServerOrdered extends Notification
{
    public function via($notifiable)
   	{
   	    return [NetCoreChannel::class];
   	}

    
    public function toNetCore($notifiable)
    {
        return (new NetCoreMessage("Your One Time Password (OTP) from TrakNPay is " . $this->otp))->to($notifiable->mobile);
    }
}

Changelog

Please see CHANGELOG for more information what has changed recently.

Testing

$ composer test

Security

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

Contributing

Please see CONTRIBUTING for details.

Credits

License

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