2017 © Pedro Peláez
 

library notifynder-sender-messagebird

MessageBird Sender for the Notifynder package.

image

astrotomic/notifynder-sender-messagebird

MessageBird Sender for the Notifynder package.

  • Thursday, February 9, 2017
  • by Gummibeer
  • Repository
  • 2 Watchers
  • 2 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 1 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

Notifynder 4 MessageBird Sender - Laravel 5

GitHub release GitHub license GitHub issues Total Downloads, (*1)

StyleCI, (*2)

Code Climate, (*3)

Slack Team Slack join, (*4)

Documentation: Notifynder Docu, (*5)


Installation

Step 1

composer require astrotomic/notifynder-sender-messagebird

Step 2

Add the following string to config/app.php, (*6)

Providers array:, (*7)

Astrotomic\Notifynder\NotifynderSenderMessageBirdServiceProvider::class,

Step 3

Add the following array to config/notifynder.php, (*8)

'senders' => [
    'messagebird' => [
        'access_key' => '',
        'callbacks' => [
            'sms' => function(\Astrotomic\Notifynder\Senders\Messages\SmsMessage $message, \Fenos\Notifynder\Models\Notification $notification) {
                return $message
                    ->from(...)
                    ->to(...)
                    ->body($notification->getText());
            },
            'voice' => function(\Astrotomic\Notifynder\Senders\Messages\CallMessage $message, \Fenos\Notifynder\Models\Notification $notification) {
                return $message
                    ->from(...)
                    ->to(...)
                    ->body($notification->getText())
                    ->lang('en-gb')
                    ->male();
            },
        ],
        'store' => false, // wether you want to also store the notifications in database
    ],
],

Register the sender callback in your app/Providers/AppServiceProvider.php, (*9)

<?php
namespace App\Providers;

use Illuminate\Support\ServiceProvider;
use Astrotomic\Notifynder\Senders\MessageBirdSmsSender;
use Astrotomic\Notifynder\Senders\Messages\SmsMessage;
use Astrotomic\Notifynder\Senders\MessageBirdCallSender;
use Astrotomic\Notifynder\Senders\Messages\CallMessage;
use Fenos\Notifynder\Builder\Notification;

class AppServiceProvider extends ServiceProvider
{
    public function boot()
    {
        app('notifynder.sender')->setCallback(MessageBirdSmsSender::class, function (SmsMessage $message, Notification $notification) {
            return $message
                ->from('0123456789')
                ->to('9876543210')
                ->text($notification->getText());
        });

        app('notifynder.sender')->setCallback(MessageBirdCallSender::class, function (CallMessage $message, Notification $notification) {
            return $message
                ->from('0123456789')
                ->to('9876543210')
                ->lang('en-us')
                ->male()
                ->text($notification->getText());
        });
    }
}

The Versions

09/02 2017

dev-master

9999999-dev

MessageBird Sender for the Notifynder package.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Fabrizio Fenoglio

laravel sms voice messagebird notifications notifynder call

09/02 2017

1.2.0

1.2.0.0

MessageBird Sender for the Notifynder package.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Fabrizio Fenoglio

laravel sms voice messagebird notifications notifynder call

06/01 2017

1.1.0

1.1.0.0

MessageBird Sender for the Notifynder package.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Fabrizio Fenoglio

laravel notifications

04/01 2017

1.0.0

1.0.0.0

MessageBird Sender for the Notifynder package.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Fabrizio Fenoglio

laravel notifications

04/01 2017

1.0.0-rc

1.0.0.0-RC

MessageBird Sender for the Notifynder package.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Fabrizio Fenoglio

laravel notifications