PHP code example of waypointer-digital / bug-tracking-laravel

1. Go to this page and download the library: Download waypointer-digital/bug-tracking-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/ */

    

waypointer-digital / bug-tracking-laravel example snippets


// config/kanbino-bug-tracking.php
'before_send' => [App\Services\BugFilter::class, 'filter'],

// app/Services/BugFilter.php
class BugFilter
{
    public static function filter(array $payload, \Throwable $e): ?array
    {
        // Return null to discard, or modify and return $payload
        if (str_contains($e->getMessage(), 'some noise')) {
            return null;
        }

        return $payload;
    }
}

'not_tenant_aware_jobs' => [
    \Kanbino\BugTracking\Jobs\SendErrorReport::class,
],

use Kanbino\BugTracking\Facades\Kanbino;

// Capture a caught exception
try {
    $this->riskyOperation();
} catch (\Exception $e) {
    Kanbino::captureException($e);
}

// Add custom context (

// bootstrap/app.php or app/Http/Kernel.php
->withMiddleware(function (Middleware $middleware) {
    $middleware->append(\Kanbino\BugTracking\Middleware\KanbinoRequestContext::class);
})

'breadcrumbs' => [
    'queries' => true,
    'logs' => true,
    'http_client' => true,
    'max_breadcrumbs' => 50,
],
bash
php artisan vendor:publish --tag=kanbino-bug-tracking-config
bash
php artisan vendor:publish --tag=kanbino-bug-tracking-assets