pinktie / laravel-notifications-trello
Laravel 5.x.x Notifications Channel for Trello
Requires
- php: >=5.6.4
- guzzlehttp/guzzle: ~6.0
- illuminate/notifications: 5.3.*|5.4.*|5.5.*|5.6.*|5.7.*
- illuminate/support: 5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*|5.7.*
Requires (Dev)
- mockery/mockery: ^0.9.5
- orchestra/database: 3.3.x-dev
- orchestra/testbench: 3.3.x-dev
- phpunit/phpunit: 4.*
This package is not auto-updated.
Last update: 2025-01-05 07:50:08 UTC
README
PinkTie Technology Group
Laravel 5.x.x Notifications Channel for Trello
Create Trello cards with Laravel Notifications on Laravel 5.x.x
Contents
Installation
Install the package via composer:
composer require pinktie/laravel-notifications-trello
Setting up the Trello service
Add your Trello REST API Key to your config/services.php
:
// config/services.php ... 'trello' => [ 'key' => env('TRELLO_API_KEY'), ], ...
Usage
Now you can use the channel in your via()
method inside the notification:
use PinkTie\TrelloNotifications\TrelloChannel; use PinkTie\TrelloNotifications\TrelloMessage; use Illuminate\Notifications\Notification; class ProjectCreated extends Notification { public function via($notifiable) { return [TrelloChannel::class]; } public function toTrello($notifiable) { return TrelloMessage::create() ->name("Trello Card Name") ->description("This is the Trello card description") ->top() ->due('tomorrow') ->members('123456abc7890xyz'); } }
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.
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.members('')
: Accepts a comma-seperated string list of member IDs to add to the card.
Changelog
Please see CHANGELOG for more information what has changed recently.
Support
If you discover any issues or would like to request addtional features, please use the GitHub issue tracker.
Security
If you discover any security related issues, please email support@pinktietech.com 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.