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
This package makes it easy to send notifications using [NetCoreSMS](link to service) with Laravel 5.3.
- Sign up for a Netcore account
- After registration you will get feed_id, username and password
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,
],
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'),
],
...
Now you can use the channel in your via()
method inside the notification:
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);
}
}
Please see CHANGELOG for more information what has changed recently.
$ composer test
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Please see CONTRIBUTING for details.
The MIT License (MIT). Please see License File for more information.