Files
CFDivePlatform/bootstrap/app.php
T
a620906209 3ad5972a5a feat: 整合 Sentry 錯誤監控
安裝 sentry/sentry-laravel,掛載例外捕捉至 bootstrap/app.php。
.env 透過 SENTRY_LARAVEL_DSN 設定,空值時自動停用。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-29 02:29:00 +08:00

23 lines
751 B
PHP

<?php
use Illuminate\Foundation\Application;
use Illuminate\Foundation\Configuration\Exceptions;
use Illuminate\Foundation\Configuration\Middleware;
return Application::configure(basePath: dirname(__DIR__))
->withRouting(
web: __DIR__.'/../routes/web.php',
api: __DIR__.'/../routes/api.php',
commands: __DIR__.'/../routes/console.php',
channels: __DIR__.'/../routes/channels.php',
health: '/up',
)
->withMiddleware(function (Middleware $middleware) {
$middleware->alias([
'admin' => \App\Http\Middleware\EnsureAdmin::class,
]);
})
->withExceptions(function (Exceptions $exceptions) {
\Sentry\Laravel\Integration::handles($exceptions);
})->create();