GithubHelp home page GithubHelp logo

laravel-notification-channels / jusibe Goto Github PK

View Code? Open in Web Editor NEW
8.0 4.0 6.0 25 KB

Jusibe notifications channel for Laravel

Home Page: http://laravel-notification-channels.com

License: MIT License

PHP 100.00%
laravel jusibe notifications jusibe-notifications phone sms email channels notification-channel messaging

jusibe's Introduction

Jusibe notifications channel for Laravel

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

This package makes it easy to send Jusibe notifications with Laravel 5.5+, 6.x, & 7.x.

Contents

Installation

You can install the package via composer:

composer require laravel-notification-channels/jusibe

You must install the service provider:

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

Setting up your Jusibe account

Add your Jusibe Account Key, Acess Token, and From Number (optional) to your config/services.php:

// config/services.php
...
'jusibe' => [
    'key' => env('JUSIBE_PUBLIC_KEY'),
    'token' => env('JUSIBE_ACCESS_TOKEN'),
    'sms_from' => 'PROSPER'
],
...

Usage

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

use NotificationChannels\Jusibe\JusibeChannel;
use NotificationChannels\Jusibe\JusibeMessage;
use Illuminate\Notifications\Notification;

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

    public function toJusibe($notifiable)
    {
        return (new JusibeMessage())
            ->content("Your {$notifiable->service} account was approved!");
    }
}

In order to let your Notification know which phone number you are sending to, add the routeNotificationForJusibe method to your Notifiable model e.g your User Model

public function routeNotificationForJusibe()
{
    return $this->phone; // where `phone` is a field in your users table;
}

Available Message methods

JusibeMessage

  • from(''): Accepts a phone to use as the notification sender.
  • content(''): Accepts a string value for the notification body.

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.

jusibe's People

Contributors

atymic avatar casperboone avatar freekmurze avatar jaybizzle avatar mpociot avatar oyed avatar themsaid avatar unicodeveloper avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

jusibe's Issues

Maintenance

Hi @unicodeveloper

Are you still maintaining this channel?
If so, could you update it support later versions for PHP/Laravel (5.5 - 6.0)?

Thanks

Code review

Hi, I did a code review and fixed some minor things. If I've done anything you don't like, reopen this issue and let me know.

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.