1. Go to this page and download the library: Download architectnate/triggr-php 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/ */
// With event name only
Triggr::watch("MyEvent", function(){ echo "Event has fired!"; });
// With full event phrase (nameing the handler ourselves)
Triggr::watch("MyEvent:FireMessage", function(){ echo "Event has fired!"; });