2017-25 © Pedro Peláez
 

library laravel-notification-channel-globe-labs-sms

This package makes it easy to send notifications using Globe Labs SMS with Laravel 5.3, 5.4, and 5.5

image

coreproc/laravel-notification-channel-globe-labs-sms

This package makes it easy to send notifications using Globe Labs SMS with Laravel 5.3, 5.4, and 5.5

  • Friday, June 1, 2018
  • by coreproc
  • Repository
  • 5 Watchers
  • 3 Stars
  • 19 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 7 Versions
  • 27 % Grown

The README.md

Laravel Globe Labs SMS Notification Channel

Latest Version on Packagist Software License StyleCI SensioLabsInsight Quality Score Total Downloads, (*1)

This package makes it easy to send notifications using Globe Labs SMS with Laravel 5.3 and above., (*2)

Contents

Installation

Install this package with Composer:, (*3)

composer require coreproc/laravel-notification-channel-globe-labs-sms

Register the ServiceProvider in your config/app.php (Skip this step if you are using Laravel 5.5 and above):, (*4)

Coreproc\GlobeLabsSms\GlobeLabsSmsServiceProvider::class,

Setting up the Globe Labs Sms service

Start by creating a project here: http://www.globelabs.com.ph/#!/developer/api/sms, (*5)

Please note that this package does not handle the opt-in steps required for a user to subscribe to your Globe Labs SMS application., (*6)

This package assumes that you have the opt-in steps handled either via SMS or through a web form and that you already have access to the subscriber's access token., (*7)

Once you've registered and set up your app, add the short code to your configuration in config/broadcasting.php, (*8)

'connections' => [
    ....
    'globe_labs_sms' => [
        'short_code' => env('GLOBE_LABS_SMS_SHORT_CODE'),
    ],
    ...
]

Usage

Set a routeNotificationForGlobeLabsSms() method in your model/class with the Notifiable trait. For example:, (*9)

class User extends Model
{
    use Notifiable;

    public function routeNotificationForGlobeLabsSms()
    {
        return [
            'access_token' => 'access-token-obtained-from-sms-opt-in-this-could-be-stored-in-your-database',
            'address' => '09171234567', // can be any format as long as it is a valid mobile number
        ];
    }
}

You can now send SMS via Globe Labs by creating an GlobeLabsSmsMessage in a Notification class:, (*10)

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

    public function toGlobeLabsSms($notifiable) 
    {
        return GlobeLabsSmsMessage::create($notifiable)
            ->setMessage('This is a test message');
    }
}

Call the SMS notification by calling the notify() method in the model/class. For example:, (*11)

$user = User::find(1);

$user->notify(new AccountActivated);

Security

If you discover any security related issues, please email chris.bautista@coreproc.ph instead of using the issue tracker., (*12)

Contributing

Please see CONTRIBUTING for details., (*13)

Credits

License

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

The Versions

01/06 2018

dev-master

9999999-dev https://github.com/coreproc/globe-labs-sms-notification

This package makes it easy to send notifications using Globe Labs SMS with Laravel 5.3, 5.4, and 5.5

  Sources   Download

MIT

The Requires

 

The Development Requires

01/06 2018
25/05 2018
25/05 2018
16/05 2018
16/05 2018

dev-develop

dev-develop https://github.com/coreproc/globe-labs-sms-notification

This package makes it easy to send notifications using Globe Labs SMS with Laravel 5.3, 5.4, and 5.5

  Sources   Download

MIT

The Requires

 

The Development Requires

05/05 2018