PHP code example of afterbug / afterbug-laravel

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

    

afterbug / afterbug-laravel example snippets


'providers' => [
    // ...
    AfterBug\AfterBugLaravel\AfterBugServiceProvider::class,
],

AfterBug::registerCallback(function ($config) {
    $config->setMetaData([
        'custom' => 'Your custom data', 
    ]);
})->catchException($e);

AfterBug::registerCallback(function ($config) {
    if (Sentinel::check()) {
        $config->setUser(
            Sentinel::getUser()->toArray()
        );
    }
})->catchException($e);

php artisan vendor:publish --provider='AfterBug\AfterBugLaravel\AfterBugServiceProvider'