BaseClient, which conflicts with Laravel’s dependency injection (DI) container.Illuminate\Contracts\Events\Dispatcher).Illuminate\Http\Client) or retry policies.app/Exceptions/Handler.php) for critical error logging.BaseClient in a Laravel service provider, facade, or decorator to align with Laravel’s patterns (e.g., pitcher()->critical($message)).App\Models\ErrorLog).Log facade or services like Sentry/Laravel Error Tracking?SECRET be stored securely (env file, Vault, Laravel’s config/services.php)?App\Exceptions\Handler)?Log::critical() + external webhooks) that meet the same needs with lower risk?app/Services/PitcherClient.php) with DI.BaseClient and expose it via the container.App\Exceptions\Handler).PitcherClient service class to test basic functionality (e.g., logging critical errors).braune-digital/pitcher to composer.json (with ^1.0 constraint).BaseClient to the container:
// app/Providers/PitcherServiceProvider.php
public function register()
{
$this->app->singleton('pitcher.client', function ($app) {
return new \BrauneDigital\Pitcher\Client\BaseClient(
config('services.pitcher.satellite_name'),
config('services.pitcher.secret')
);
});
}
config/services.php) for satellite name/secret.App\Exceptions\Handler to use Pitcher for critical errors:
public function report(Throwable $exception)
{
if ($exception instanceof CriticalException) {
app('pitcher.client')->pitch(
\BrauneDigital\Pitcher\Notification\Notification::LEVEL_CRITICAL,
$exception->getMessage()
);
}
parent::report($exception);
}
App\Http\Middleware\LogPitcherErrors).tinker integration).How can I help you explore Laravel packages today?