Exception Viewer by Bezhan Salleh
CommunityA Simple & Beautiful Laravel Native Exception Logger and Viewer plugin for your Filament Panels.
Author:
Bezhan Salleh
Package health
Automated checks of this plugin's Composer package
15 checks
- Passed: GitHub Actions pinned to SHA
- Skipped: GitLab CI includes pinned to SHA
- Passed: Open security advisories
- Passed: Dependabot PR responsiveness — No open Dependabot PRs.
- Skipped: Renovate MR responsiveness
- Passed: Dependabot or Renovate configured
- Passed: Dependency update cooldown configured
- Passed: Provides a security policy
- Passed: Abandoned or archived — No consulted source marks the package abandoned (packagist, github).
- Passed: Commit and release recency — Active: last commit 0 days ago; last release 130 days ago.
-
Passed:
composer.lock not committed by library
—
composer.lockis absent from the released dist archive. - Passed: Dist archive is lean
-
Passed:
Current Laravel version supported
—
Package dependencies resolve together with current Laravel
13.0. -
Passed:
Current PHP version supported
—
Constraint
^8.2|^8.3supports current PHP8.5. - Skipped: Current Symfony version supported
filament/
namespace. Review the source and install at your own risk. Found
malware or an unresolved security issue the author won't
address?
Report it
.
Documentation
- Installation
- Recording Control
- Configuration Options
- Custom Exception Model
- Translations
- Testing
- Version Support
- Changelog
- Contributing
- Security Vulnerabilities
- Credits
- License
A simple and beautiful exception viewer for Filament Panels. The plugin records every exception your app throws and lets you browse, inspect and prune them from inside the panel.
#Installation
- Install the package with Composer:
composer require bezhansalleh/filament-exceptions
- Publish and run the migration:
php artisan exceptions:install
- Register the plugin in your panel provider:
public function panel(Panel $panel): Panel
{
return $panel
->plugins([
\BezhanSalleh\FilamentExceptions\FilamentExceptionsPlugin::make()
]);
}
That's it. The package hooks into Laravel's exception handler and starts recording exceptions right away.
Important
The plugin follows Filament's theming rules. Create a custom theme if you haven't already, then add the following line to your theme.css file:
@source '../../../../vendor/bezhansalleh/filament-exceptions/resources/views/**/*.blade.php';
Then build your theme:
npm run build
#Recording Control
The plugin records exceptions by default. Control that behavior from the boot() method of your AppServiceProvider.
#Stop and Start Recording
use BezhanSalleh\FilamentExceptions\FilamentExceptions;
public function boot(): void
{
// Stop recording exceptions
FilamentExceptions::stopRecording();
// Resume recording
FilamentExceptions::startRecording();
// Check whether recording is active
FilamentExceptions::isRecording();
}
#Conditional Recording
Call recordUsing() to decide, per exception, whether the plugin records it:
use BezhanSalleh\FilamentExceptions\FilamentExceptions;
public function boot(): void
{
// Record only in production
FilamentExceptions::recordUsing(fn () => app()->isProduction());
// Skip specific exception types
FilamentExceptions::recordUsing(function (Throwable $e) {
return ! $e instanceof \Illuminate\Validation\ValidationException
&& ! $e instanceof \Illuminate\Auth\AuthenticationException;
});
// Combine several conditions
FilamentExceptions::recordUsing(function (Throwable $e) {
if (! app()->isProduction()) {
return false;
}
// Skip 4xx HTTP exceptions
if ($e instanceof \Symfony\Component\HttpKernel\Exception\HttpException
&& $e->getStatusCode() < 500) {
return false;
}
return true;
});
}
#Configuration Options
Chain any of the following methods onto the plugin when you register it.
#Navigation
FilamentExceptionsPlugin::make()
->navigationBadge(bool | Closure $condition = true)
->navigationBadgeColor(string | array | Closure $color)
->navigationGroup(string | Closure | null $group)
->navigationParentItem(string | Closure | null $item)
->navigationIcon(string | Closure | null $icon)
->activeNavigationIcon(string | Closure | null $icon)
->navigationLabel(string | Closure | null $label)
->navigationSort(int | Closure | null $sort)
->registerNavigation(bool | Closure $shouldRegisterNavigation)
->subNavigationPosition(SubNavigationPosition | Closure $position)
#Labels and Search
FilamentExceptionsPlugin::make()
->modelLabel(string | Closure | null $label)
->pluralModelLabel(string | Closure | null $label)
->titleCaseModelLabel(bool | Closure $condition = true)
->globallySearchable(bool | Closure $condition = true)
#Mass Pruning
FilamentExceptionsPlugin::make()
->modelPruneInterval(CarbonInterface $interval)
Note
Pruning runs through Laravel's scheduler, so make sure you have it running.
#Tenancy
FilamentExceptionsPlugin::make()
->scopeToTenant(bool | Closure $condition = true)
->tenantOwnershipRelationshipName(string | Closure | null $ownershipRelationshipName)
->tenantRelationshipName(string | Closure | null $relationshipName)
#General
FilamentExceptionsPlugin::make()
->cluster(string | Closure | null $cluster)
->slug(string | Closure | null $slug)
A combined example:
return $panel
->plugins([
FilamentExceptionsPlugin::make()
->navigationLabel('Error Logs')
->navigationIcon('heroicon-o-bug-ant')
->navigationBadge()
->navigationGroup('System')
->modelPruneInterval(now()->subDays(7))
]);
#Custom Exception Model
- Extend the base model:
<?php
namespace App\Models;
use BezhanSalleh\FilamentExceptions\Models\Exception as BaseException;
class MyCustomException extends BaseException
{
...
}
- Register it in the
boot()method of a service provider, for exampleAppServiceProvider:
use App\Models\MyCustomException;
use BezhanSalleh\FilamentExceptions\FilamentExceptions;
...
public function boot()
{
FilamentExceptions::model(MyCustomException::class);
}
...
#Translations
Publish the translations:
php artisan vendor:publish --tag=filament-exceptions-translations
#Testing
composer test
#Version Support
Only the latest major plugin line receives active development. Older lines stay installable for legacy projects but get no new features; they only receive security fixes while their Filament target is still supported upstream.
See CHANGELOG for migration notes between majors.
#Changelog
See CHANGELOG for the list of recent changes.
#Contributing
See CONTRIBUTING for details.
#Security Vulnerabilities
Review our security policy to learn how to report security vulnerabilities.
#Credits
#License
The MIT License (MIT). See the License File for more information.
The author
Bezhan Salleh is a full-stack developer with a strong focus on backend development and a passion for open-source. He’s the creator of Shield, Filament’s most starred plugin, and the author of other popular plugins, including Plugin Essentials and Google Analytics. His work focuses on delivering practical, powerful solutions with an emphasis on performance and developer experience.
From the same author
Plugin Essentials
A collection of essential traits that streamline Filament plugin development by taking care of the boilerplate, so you can focus on shipping real features faster.
Author:
Bezhan Salleh
Shield
The easiest and most intuitive way to handle `Policies` and `Permissions for your Filament Panels' components.
Author:
Bezhan Salleh
Panel Switch
Switch between Filament panels with ease.
Author:
Bezhan Salleh
Language Switch
A versatile, feature-rich, drop-in language switch for any Filament Panels.
Author:
Bezhan Salleh
Featured Plugins
A selection of plugins curated by the Filament team
Custom Dashboards
Let your users build and share their own dashboards with a drag-and-drop interface. Define your data sources in PHP and let them do the rest.
Filament
Custom Fields
Eliminate custom field migrations forever. Let your users create and manage form fields directly in Filament admin panels with 20+ built-in field types, validation, and zero database changes.
Relaticle
Soft Theme
A theme that gives panels a warm, approachable look with rounded shapes, gentle colors, and serif headings.
Filament