PHP code example of devorto / slack-logger
1. Go to this page and download the library: Download devorto/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/ */
devorto / slack-logger example snippets
$slack = new \Devorto\Logger\Slack(
'<paste-webhook-url-here>',
'My Test App',
'https://test.example.com' // Optional app url.
);
// Use one of the available log level methods:
$slack->critical('Help something went critical.');
// You can also drop an Exception in here.
$slack->critical(new Exception('Test'));