1. Go to this page and download the library: Download muhamadhhassan/laramost 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/ */
Log::channel('mattermost')->error('Something went wrong', ['user_id' => 5]);
use Monolog\Logger;
use LaraMost\Formatter\MattermostFormatter;
use LaraMost\Handler\MattermostWebhookHandler;
$logger = new Logger('application');
$handler = new MattermostWebhookHandler('https://your-mattermost.com/hooks/xxx-generatedkey-xxx', Logger::ERROR);
$handler->setFormatter(new MattermostFormatter())
$logger->pushHandler($handler);
$logger->error('Something went wrong', ['user_id' => 5]);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.