PHP code example of danbettles / slack-logger
1. Go to this page and download the library: Download danbettles/slack-logger 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/ */
danbettles / slack-logger example snippets
use DanBettles\SlackLogger\Logger;
$logger = Logger::create(
'<Name of host app>',
'<Slack webhook URL>',
);
$logger->debug('Enemy tanks approaching');
$logger->emergency('Send out the patrol!', [
'exception' => $ex,
]);