All SDKs

Laravel

v4.29.0

sentry/sentry-laravel

Use the official Sentry SDK with the DSN shown in your AllStak project setup. No AllStak-specific SDK is required.

Install

These official Sentry commands come from the AllStak-managed SDK catalog.

composer
composer require sentry/sentry-laravel

Quick start

# Laravel is configured through artisan and .env, not an inline init() call.
# Full guide: https://docs.sentry.io/platforms/php/guides/laravel/

# 1. Publish the config with your AllStak DSN
php artisan sentry:publish --dsn={{DSN}}

# 2. .env — the publish step writes this for you
SENTRY_LARAVEL_DSN={{DSN}}
SENTRY_TRACES_SAMPLE_RATE=1.0
SENTRY_ENVIRONMENT=production
[email protected]

# 3. bootstrap/app.php — register the exception handler (Laravel 11+)
#
#    use Sentry\Laravel\Integration;
#
#    ->withExceptions(function (Exceptions $exceptions) {
#        Integration::handles($exceptions);
#    })

# 4. Verify the wiring end to end
php artisan sentry:test