PHP code example of nhalstead / php-facilitator

1. Go to this page and download the library: Download nhalstead/php-facilitator 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/ */

    

nhalstead / php-facilitator example snippets


>

>use nhalstead\Facilitator\Facilitator;
>use nhalstead\Facilitator\Endpoints\DiscordWebhook;
>
> // Create new Queue
>$queue = new Facilitator();
>
>// Make new Event
>$newEvent = new DiscordWebhook("[DISCORD WEBHOOK URL]");
>$newEvent->username("John");
>$newEvent->avatar("https://png.icons8.com/clouds/50/000000/megaphone.png");
>$newEvent->message("Hello");
>
>
>// Add and Send Events in Queue
>$queue->addEvent($newEvent);
>$queue->sendEvents();
>
bash
>composer 
bash
>git clone https://github.com/nhalstead/php-facilitator.git
>