1. Go to this page and download the library: Download taitai42/stklog-laravel 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/ */
// use taitai42\Stklog\Model\StackRepository;
StackRepository::stack('incoming request', null, $request->headers->all());
Log::info("parsing request ...");
use Monolog\Logger;
use taitai42\Stklog\Handler\StklogHttpHandler;
// create a log channel
$log = new Logger('name');
$log->pushHandler(new StklogHttpHandler('your-project-key', Logger::WARNING));
// add records to the log
$log->warning('Foo');
$log->error('Bar');
bash
php artisan vendor:publish
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.