PHP code example of rawand201 / filament-connection-badge
1. Go to this page and download the library: Download rawand201/filament-connection-badge library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
rawand201 / filament-connection-badge example snippets
return [
'enabled' => env('FILAMENT_CONNECTION_BADGE_ENABLED', true),
// Filament panel hook name (default: before the user menu). See Filament\View\PanelsRenderHook.
'render_hook' => env(
'FILAMENT_CONNECTION_BADGE_RENDER_HOOK',
'panels::user-menu.before'
),
// Optional Gate / policy ability — badge and ping ('FILAMENT_CONNECTION_BADGE_PING_URL'),
'ping_interval' => 5000,
'thresholds' => [
'full' => 200,
'medium' => 600,
],
'max_samples' => 30,
];