### Install Filament Debugger Source: https://github.com/stephenjude/filament-debugger/blob/main/README.md Installs the Filament Debugger package using Composer. This is the initial step to integrate debugging tools into your Filament application. ```bash composer require stephenjude/filament-debugger ``` -------------------------------- ### Configure Gates for Production Environment Source: https://github.com/stephenjude/filament-debugger/blob/main/README.md Demonstrates how to override the `gate()` method in service providers (Horizon, Telescope, Pulse) to ensure these tools are only accessible to authorized users in a production environment, using Filament's default authorization guard. ```php protected function gate() { Gate::define('viewHorizon', function ($user) { return $user->can('view.debuggers'); }); } protected function authorization() { Auth::setDefaultDriver(config('filament.auth.guard')); parent::authorization(); } ``` -------------------------------- ### Configure Custom Navigation Items for Debugging Tools Source: https://github.com/stephenjude/filament-debugger/blob/main/README.md Enables the customization of navigation items for Horizon, Telescope, and Pulse. You can define conditions for visibility, labels, icons, URLs, and whether to open in a new tab. ```php use StephenjudeFilamentDebuggerDebuggerPlugin; $panel->plugin( DebuggerPlugin::make() ->horizonNavigation( condition: fn () => auth()->user()->can('view.horizon'), label: 'Horizon', icon: 'heroicon-o-globe-europe-africaglobe-europe-africa', url: url('horizon'), openInNewTab: fn () => true ) ->telescopeNavigation( condition: fn()=> auth()->user()->can('view.telescope'), label: 'Telescope', icon: 'heroicon-o-sparkles', url: url('telescope'), openInNewTab: fn () => true ) ->pulseNavigation( condition: fn () => auth()->user()->can('view.pulse'), label: 'Pulse', icon: 'heroicon-o-bolt', url: url('pulse'), openInNewTab: fn () => true ) ); ``` -------------------------------- ### Authorize Debugger Plugin by Role/Permission Source: https://github.com/stephenjude/filament-debugger/blob/main/README.md Customizes the authorization for the DebuggerPlugin, allowing you to specify a condition (e.g., a user role or permission) to control access to the debugging features. ```php DebuggerPlugin::make() ->authorize(condition: fn() => auth()->user()->can('view.debuggers')); ``` -------------------------------- ### Customize Navigation Group for Debugger Source: https://github.com/stephenjude/filament-debugger/blob/main/README.md Allows you to set a custom label for the navigation group that contains the debugging tools within the Filament admin panel. This helps in organizing your navigation menu. ```php use StephenjudeFilamentDebuggerDebuggerPlugin; $panel->plugin( DebuggerPlugin::make() ->navigationGroup(condition: true, label: 'Debugger') ); ``` -------------------------------- ### Add Debugger Plugin to Filament Panel Source: https://github.com/stephenjude/filament-debugger/blob/main/README.md Adds the DebuggerPlugin to your Filament panel configuration. This enables the core functionality of the package, making debugging tools available within the admin panel. ```php use StephenjudeFilamentDebuggerDebuggerPlugin; public function panel(Panel $panel): Panel { return $panel ->plugin( DebuggerPlugin::make() ); } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.