Giter VIP home page Giter VIP logo

workplace's Introduction

Workplace Notifications Channel for Laravel

Latest Version on Packagist Software License Tests Quality Score Total Downloads

This package makes it easy to send notifications using Workplace with Laravel 5.5+ and 6.0

Contents

Installation

You can install the package via composer:

composer require laravel-notification-channels/workplace

Usage

You can now use the channel in your via() method inside the Notification class.

use NotificationChannels\Workplace\WorkplaceChannel;
use NotificationChannels\Workplace\WorkplaceMessage;
use Illuminate\Notifications\Notification;

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

    public function toWorkplace($notifiable)
    {
        return new WorkplaceMessage('# Laravel Notification Channels are awesome!');
    }
}

You also need to add the routeNotificationForWorkplace() method in your notifiable model:

class TestNotifiable
{
    use \Illuminate\Notifications\Notifiable;

    public function routeNotificationForWorkplace()
    {
        return 'https://graph.facebook.com/<groupId>/feed?access_token=<access_token>';
    }
}

Available Message methods

  • content(''): (string) Notification message, supports markdown.
  • asMarkdown(): Treats the message content as being Markdown (default)
  • asPlainText(): Treats the message content as being plain text

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.

workplace's People

Contributors

atymic avatar ghunti avatar josepostiga avatar ziming avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

workplace's Issues

Channel Launch

  • Final Code Review
  • Add @ghunti as repo admin
  • Add @ghunti to github org
  • Add to website
  • Create packagist package
  • Travis
  • Style CI
  • Scrutinizer
  • Add badges

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.