PHP code example of binaryhype / kiroku

1. Go to this page and download the library: Download binaryhype/kiroku 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/ */

    

binaryhype / kiroku example snippets


return [
    'api' => [
        'url' => env('KIROKU_API_URL', ''),
        'bearer_token' => env('KIROKU_API_BEARER_TOKEN', ''),
    ],
    'queue' => [
        'enabled' => env('KIROKU_QUEUE_ENABLED', false),
    ],
];

use BinaryHype\Kiroku\Kiroku;
use Illuminate\Foundation\Configuration\Exceptions;

return Application::configure(basePath: dirname(__DIR__))
    ->withExceptions(function (Exceptions $exceptions) {
        app(Kiroku::class)->handles($exceptions);
    })
    // ...
    ->create();

use BinaryHype\Kiroku\Kiroku;

try {
    // ...
} catch (\Throwable $e) {
    Kiroku::logException($e);
}
bash
php artisan vendor:publish --tag="kiroku-config"
bash
php artisan kiroku:test