PHP code example of d3s-datasapiens / filament-server-indicator
1. Go to this page and download the library: Download d3s-datasapiens/filament-server-indicator 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/ */
d3s-datasapiens / filament-server-indicator example snippets
use D3SDataSapiens\ServerIndicator\ServerIndicatorPlugin;
public function panel(Panel $panel): Panel
{
return $panel
->plugin(
ServerIndicatorPlugin::make()
->version('1.0.0')
->copyright('© :year Your Company')
);
}
ServerIndicatorPlugin::make()
->version('1.0.0')
->copyright('© :year D3S')
ServerIndicatorPlugin::make()
->version('1.0.0')
->copyright('© :year D3S')
->cookieName('SRVNAME')
->stripPrefix('/^load-balanced-/')
ServerIndicatorPlugin::make()
->showVersion(true)
->showServer(true)
->showCopyright(true)
ServerIndicatorPlugin::make()
->logging(true, 'daily')
ServerIndicatorPlugin::make()
->tenantResolver(fn ($user) => $user->currentTenant?->name)
return [
/*
|--------------------------------------------------------------------------
| Application Version
|--------------------------------------------------------------------------
*/
'version' => env('APP_VERSION', '1.0.0'),
/*
|--------------------------------------------------------------------------
| Cookie Name
|--------------------------------------------------------------------------
*/
'cookie_name' => env('SERVER_INDICATOR_COOKIE', 'SRVNAME'),
/*
|--------------------------------------------------------------------------
| Server Name Prefix to Remove
|--------------------------------------------------------------------------
*/
'strip_prefix' => '/^load-balanced-/',
/*
|--------------------------------------------------------------------------
| Copyright Text
|--------------------------------------------------------------------------
*/
'copyright' => env('SERVER_INDICATOR_COPYRIGHT', '© :year D3S'),
/*
|--------------------------------------------------------------------------
| Logging Configuration
|--------------------------------------------------------------------------
*/
'logging' => [
'enabled' => env('SERVER_INDICATOR_LOG', false),
'channel' => env('SERVER_INDICATOR_LOG_CHANNEL', 'stack'),
'
bash
php artisan vendor:publish --tag=server-indicator-config
bash
php artisan vendor:publish --tag=server-indicator-views
bash
php artisan vendor:publish --provider="D3SDataSapiens\ServerIndicator\ServerIndicatorServiceProvider"