PHP code example of dragon-code / sentriable-laravel

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

    

dragon-code / sentriable-laravel example snippets


$app->register(\DragonCode\Sentry\ServiceProvider::class);

use DragonCode\Sentry\Traits\Sentriable;
use Throwable;

public function report(Throwable $exception)
{
    parent::report($exception);

    if ($this->shouldReport($e)) {
        $this->sentryException($e);
    }
}

use DragonCode\Sentry\Traits\Sentriable;
use Exception;

public function report(Exception $exception)
{
    parent::report($exception);

    if ($this->shouldReport($e)) {
        $this->sentryException($e);
    }
}

use DragonCode\Sentry\Traits\Sentriable
use Throwable;

protected function handle()
{
    try {
        // some code
    } catch (Throwable $e) {
        $this->sentryException($e);
    }
}

use DragonCode\Sentry\Traits\Sentriable;
use Throwable;

protected function handle()
{
    foreach ($this->values as $item) {
        try {
            $this->sentryFlush();
        
            // some code
        } catch (Throwable $e) {
            $this->sentryException($e);
        }
    }
}

use DragonCode\Sentry\Facades\Sha;

return [
    // ...
    'release' => Sha::get()
    // ...
];