No description or website provided.
PHP
Permalink
Failed to load latest commit information.
src initial Aug 21, 2016
.gitignore initial Aug 21, 2016
CHANGELOG.md initial Aug 21, 2016
CONTRIBUTING.md initial Aug 21, 2016
LICENSE.md initial Aug 21, 2016
README.md initial Aug 21, 2016
composer.json Compatibility with Laravel 5.4 Jan 24, 2017

README.md

OVH SMS driver for Laravel Notifications

Latest Version on Packagist Software License StyleCI Quality Score Code Coverage Total Downloads

This package provide an OVH SMS driver for Laravel Notifications using OVH.

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 OVH SMS with Laravel 5.3.

Contents

Installation

You can install the package via composer:

composer require laravel-notification-channels/ovh

You must install the service provider:

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

Then, publish the config:

php artisan vendor:publish --provider="Akibatech\Ovhsms\ServiceProvider"

Setting up the OVH SMS service

  • Subscribe to a plan at OVH (20 free credits).
  • Get your credentials
  • Configure your credentials in config/laravel-ovh-sms.php in the ovh array.
  • Configure your SMS account (given in your OVH welcome email)
// config/laravel-ovh-sms.php
...
[
    'app_key'  => env('OVHSMS_API_KEY'),
    'app_secret' => env('OVHSMS_API_SECRET'),
    'consumer_key' => env('OVHSMS_CONSUMER_KEY'),
    'endpoint' => env('OVHSMS_ENDPOINT'),
    'sms_account' => env('OVHSMS_ACCOUNT'),
],
...

Usage

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

use Illuminate\Notifications\Notification;
use Akibatech\Ovhsms\Notifications\OvhSmsMessage;
use Akibatech\Ovhsms\Notifications\OvhSmsChannel;

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

    public function toOvh($notifiable)
    {
        return (new OvhSmsMessage())->content("Your invoice has been paid!");
    }
}

Available methods

  • content(''): Specifies the SMS content.

Changelog

Please see CHANGELOG for more information what has changed recently.

Testing

There's no test at this moment. php-ovh-sms library on what this package depends has tests.

Security

If you discover any security related issues, please use the issue tracker.

Contributing

Please see CONTRIBUTING for details.

Credits

License

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