Skip to content

Commit cc29bae

Browse files
authored
Update Laravel error handler (#5757)
1 parent 1654102 commit cc29bae

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/platforms/php/guides/laravel/index.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ composer require sentry/sentry-laravel
2323
Enable capturing unhandled exception to report to Sentry by making the following change to your `App/Exceptions/Handler.php`:
2424

2525
```php {filename:App/Exceptions/Handler.php}
26+
use Sentry\Laravel\Integration;
27+
2628
public function register()
2729
{
2830
$this->reportable(function (Throwable $e) {
29-
if (app()->bound('sentry')) {
30-
app('sentry')->captureException($e);
31-
}
31+
Integration::captureUnhandledException($e);
3232
});
3333
}
3434
```

0 commit comments

Comments
 (0)