Code Monkey home page Code Monkey logo

skymobile's Introduction

Skymobile notifications channel for Laravel 5.

This package makes it easy to send Skymobile SMS notifications with Laravel 5.5.

Please note that the current documentation is out-of-sync with the package.

Full credit to Peter Steenbergen for his original work on Messagebird.

Contents

Requirements

You need a registered account with Skymobile since they don't accept new users.

Installation

You can install the package via composer:

composer require tomdewit/skymobile

You may install the service provider:

// config/app.php
'providers' => [
    ...
    Tomdewit\Skymobile\SkymobileServiceProvider::class,
],

Setting up your Skymobile account

Add your Skymobile Access Key, Default originator (name or number of sender), and default recipients to your config/services.php:

// config/services.php
...
'Skymobile' => [
    'access_key' => env('Skymobile_ACCESS_KEY'),
    'originator' => env('Skymobile_ORIGINATOR'),
    'recipients' => env('Skymobile_RECIPIENTS'),
],
...

Notice: The originator can contain a maximum of 11 alfa-numeric characters.

Usage

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

use Tomdewit\Skymobile\SkymobileChannel;
use Tomdewit\Skymobile\SkymobileMessage;
use Illuminate\Notifications\Notification;

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

    public function toSkymobile($notifiable)
    {
        return (new SkymobileMessage("Your {$notifiable->service} was ordered!"));
    }
}

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.

skymobile's People

Contributors

ttomdewit avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.