for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Zing\LaravelSentry\Support;
use Illuminate\Container\Container;
use Sentry\Laravel\ServiceProvider;
use Sentry\State\Hub;
class SentryIntegration
{
public static function getAbstract(): string
if (class_exists(ServiceProvider::class)) {
return ServiceProvider::$abstract;
}
return 'sentry';
public static function bound(): bool
return Container::getInstance()->bound(static::getAbstract());
public static function captureException($exception): void
if (static::bound()) {
static::getInstance()->captureException($exception);
public static function getInstance(): Hub
return Container::getInstance()->make(static::getAbstract());