PHP code example of pinktie / laravel-notifications-trello

1. Go to this page and download the library: Download pinktie/laravel-notifications-trello library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

pinktie / laravel-notifications-trello example snippets


// config/services.php
...
'trello' => [
    'key' => env('TRELLO_API_KEY'),
],
...

public function routeNotificationForTrello()
{
    return [
        'token' => 'NotifiableToken',
        'idList' => 'TrelloListId',
    ];
}
 php
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');
    }
}