2017 © Pedro Peláez
 

library trello

Trello Notifications driver

image

laravel-notification-channels/trello

Trello Notifications driver

  • Wednesday, July 26, 2017
  • by laravel-notification-channels
  • Repository
  • 2 Watchers
  • 13 Stars
  • 646 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 7 Forks
  • 6 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Trello notifications channel for Laravel

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

This package makes it easy to create Trello cards with Laravel 6.x, 7.x & 8.x., (*2)

Contents

Installation

You can install the package via composer:, (*3)

``` bash composer require laravel-notification-channels/trello, (*4)


### Setting up the Trello service Add your Trello REST API Key to your `config/services.php`: ```php // config/services.php ... 'trello' => [ 'key' => env('TRELLO_API_KEY'), ], ...

Usage

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

``` php use NotificationChannels\Trello\TrelloChannel; use NotificationChannels\Trello\TrelloMessage; use Illuminate\Notifications\Notification;, (*6)

class ProjectCreated extends Notification { public function via($notifiable) { return [TrelloChannel::class]; }, (*7)

public function toTrello($notifiable)
{
    return TrelloMessage::create()
        ->name("Trello Card Name")
        ->description("This is the Trello card description")
        ->top()
        ->due('tomorrow');
}

}, (*8)


In order to let your Notification know which Trello user and Trello list you are targeting, add the `routeNotificationForTrello` method to your Notifiable model. This method needs to return an array containing the access token of the authorized Trello user (if it's a private board) and the list ID of the Trello list to add the card to. ```php public function routeNotificationForTrello() { return [ 'token' => 'NotifiableToken', 'idList' => 'TrelloListId', ]; }

Available methods

  • name(''): Accepts a string value for the Trello card name.
  • description(''): Accepts a string value for the Trello card description.
  • top(): Moves the Trello card to the top.
  • bottom(): Moves the Trello card to the bottom.
  • position(''): Accepts an integer for a specific Trello card position.
  • due(''): Accepts a string or DateTime object for the Trello card due date.

Changelog

Please see CHANGELOG for more information what has changed recently., (*9)

Testing

bash $ composer test, (*10)

Security

If you discover any security related issues, please email m.pociot@gmail.com instead of using the issue tracker., (*11)

Contributing

Please see CONTRIBUTING for details., (*12)

Credits

License

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

The Versions