PHP code example of honeybadger-io / nova-honeybadger

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

    

honeybadger-io / nova-honeybadger example snippets


'honeybadger' => [
    'auth_token' => env('HONEYBADGER_AUTH_TOKEN'),
    'project_id' => env('HONEYBADGER_PROJECT_ID')
]

public function fields(Request $request)
{
    return [
        ID::make()->sortable(),

        // Your other fields

        new \HoneybadgerIo\NovaHoneybadger\Honeybadger,

    ];
}

public function fields(Request $request)
{
    return [
        ID::make()->sortable(),

        // Your other fields

        \HoneybadgerIo\NovaHoneybadger\Honeybadger::fromContextKeyAndAttribute('context.user.email', 'email'),

    ];
}

public function fields(Request $request)
{
    return [
        ID::make()->sortable(),

        // Your other fields

        \HoneybadgerIo\NovaHoneybadger\Honeybadger::fromContextKeyAndAttribute('context.user.email', '[email protected]'),

    ];
}

public function fields(Request $request)
{
    return [
        ID::make()->sortable(),

        // Your other fields

        \HoneybadgerIo\NovaHoneybadger\Honeybadger::fromSearchString('-tag:wip -tag:pending environment:"production"'),

    ];
}

public function fields(Request $request)
{
    return [
        ID::make()->sortable(),

        // Your other fields

        (new \HoneybadgerIo\NovaHoneybadger\Honeybadger)->withSearchString('-environment:"production"'),

    ];
}