স্কিপ করে মূল কন্টেন্ট এ যান

Reporter

super-admin-org/reporter stores every reported exception in a database table and shows it in the admin panel: the request that caused it, headers, cookies, and the stack trace with the surrounding source code.

Exception list

Packagesuper-admin-org/reporter
Admin URL/admin/exceptions
MenuException Reporter
Permissionext.reporter (path /exceptions*)
Tablelaravel_exceptions

Installation​

composer require super-admin-org/reporter
php artisan vendor:publish --tag=super-admin-reporter # Prism syntax highlighter
php artisan migrate
php artisan admin:import reporter

Then send exceptions to it.

Laravel 11 and newer, bootstrap/app.php:

use SuperAdmin\Admin\Reporter\Reporter;

->withExceptions(function (Exceptions $exceptions) {
$exceptions->report(function (Throwable $e) {
Reporter::report($e);
});
})

Laravel 8–10, app/Exceptions/Handler.php:

use SuperAdmin\Admin\Reporter\Reporter;

public function register(): void
{
$this->reportable(function (Throwable $e) {
Reporter::report($e);
});
}

Exceptions listed in $dontReport (validation errors, 404s, ...) are not reported, so they are not stored either.

Using it​

The list shows the exception class, code, message, HTTP method and path, Seen (how many times the same exception happened at the same file and line, 2.0+) and time. Filter by type, message, path, method or date. Show opens the detail page:

Exception detail

  • Request: method, URL, query and body, time and client IP; Headers and Cookies expand.
  • Exception Trace: every frame with its file, line and a few lines of source.

Delete old rows from the list (tick and Delete), or with the prune command (2.0+), for example daily:

// routes/console.php
Schedule::command('reporter:prune --days=30')->daily();

Sensitive data​

From release 2.0 the reporter never stores passwords, tokens, card numbers, Authorization, Cookie and CSRF headers, or cookie values; they are replaced by [redacted]. Add your own field names with redact.

Releases 1.x store the request as it arrived. If you run 1.x, restrict the ext.reporter permission to people allowed to see that data and delete old rows regularly.

Configuration​

'extensions' => [
'reporter' => [
'table' => 'laravel_exceptions', // set before running the migration
'redact' => ['national_id'], // 2.0+: extra request fields never stored
'store_cookies' => false, // 2.0+: true keeps cookie values (redacted names excepted)
'retention_days' => 30, // 2.0+: default for reporter:prune
],
],

Compatibility​

LaravelPHPState
8 – 138.0+Works; see the setup for Laravel 11+ above.

Fixed in 2.0 (affects 1.x):

  • Exception messages longer than 255 characters could fail to save on MySQL in strict mode.
  • An exception from a HEAD request broke the list page with "Undefined array key".
  • Messages and paths were shown as HTML.
  • The Input column was always empty, and created_at showed in ISO format.