d3s-datasapiens/filament-server-indicator
Composer 安装命令:
composer require d3s-datasapiens/filament-server-indicator
包简介
A Filament v4 plugin that displays server information and app version in the panel footer
README 文档
README
A Filament v4 plugin that displays server information, app version, and copyright in the panel footer. Perfect for load-balanced environments where you need to identify which server is handling requests.
Requirements
- PHP 8.2+
- Laravel 10, 11 or 12
- Filament 4.x
Installation
Step 1: Install via Composer
composer require d3s-datasapiens/filament-server-indicator
Step 2: Register the Plugin
Add the plugin to your Filament panel provider (e.g., app/Providers/Filament/AdminPanelProvider.php):
use D3SDataSapiens\ServerIndicator\ServerIndicatorPlugin; public function panel(Panel $panel): Panel { return $panel ->plugin( ServerIndicatorPlugin::make() ->version('1.0.0') ->copyright('© :year Your Company') ); }
Step 3: Publish Assets (Optional)
Publish Configuration
To customize the default settings:
php artisan vendor:publish --tag=server-indicator-config
This publishes config/server-indicator.php.
Publish Views
To customize the footer layout:
php artisan vendor:publish --tag=server-indicator-views
This publishes views to resources/views/vendor/server-indicator/.
Publish Everything
To publish all assets at once:
php artisan vendor:publish --provider="D3SDataSapiens\ServerIndicator\ServerIndicatorServiceProvider"
Usage
Basic Usage
ServerIndicatorPlugin::make() ->version('1.0.0') ->copyright('© :year D3S')
This displays: © 2025 D3S | 1.0.0
With Server Name (Load Balancer)
When behind a load balancer that sets a cookie with the server name:
ServerIndicatorPlugin::make() ->version('1.0.0') ->copyright('© :year D3S') ->cookieName('SRVNAME') ->stripPrefix('/^load-balanced-/')
This displays: © 2025 D3S | 1.0.0 | web-002
Display Options
Control what is shown in the footer:
ServerIndicatorPlugin::make() ->showVersion(true) ->showServer(true) ->showCopyright(true)
Enable Logging
Log server information on each request:
ServerIndicatorPlugin::make() ->logging(true, 'daily')
Logs include: server name, authenticated user, and tenant (if applicable).
Custom Tenant Resolver
For multi-tenant applications:
ServerIndicatorPlugin::make() ->tenantResolver(fn ($user) => $user->currentTenant?->name)
Environment Variables
Add these to your .env file:
# App version displayed in footer APP_VERSION=1.0.0 # Cookie name containing server identifier SERVER_INDICATOR_COOKIE=SRVNAME # Copyright text (:year is replaced with current year) SERVER_INDICATOR_COPYRIGHT="© :year Your Company" # Enable logging SERVER_INDICATOR_LOG=false SERVER_INDICATOR_LOG_CHANNEL=stack
Configuration File
After publishing, you can customize config/server-indicator.php:
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'), 'include_user' => true, 'include_tenant' => true, ], /* |-------------------------------------------------------------------------- | Display Options |-------------------------------------------------------------------------- */ 'display' => [ 'show_version' => true, 'show_server' => true, 'show_copyright' => true, ], ];
Customizing the Footer View
After publishing the views, you can customize resources/views/vendor/server-indicator/footer.blade.php:
<div class="flex items-center justify-center gap-x-1 text-sm text-gray-500 dark:text-gray-400"> @if($showCopyright && $copyright) <span>{{ $copyright }}</span> @endif @if($showCopyright && $copyright && ($showVersion || ($showServer && $server))) <span>|</span> @endif @if($showVersion && $version) <span>{{ $version }}</span> @endif @if($showVersion && $version && $showServer && $server) <span>|</span> @endif @if($showServer && $server) <span>{{ $server }}</span> @endif </div>
Available variables in the view:
$copyright- The formatted copyright text$version- The version string$server- The server name (from cookie)$showCopyright- Whether to show copyright$showVersion- Whether to show version$showServer- Whether to show server name
API Reference
| Method | Description |
|---|---|
version(string $version) |
Set the version string |
copyright(string $text) |
Set copyright text (:year placeholder available) |
cookieName(string $name) |
Cookie name containing server identifier |
stripPrefix(?string $pattern) |
Regex pattern to clean server name |
logging(bool $enabled, ?string $channel) |
Enable/disable logging |
showVersion(bool $show) |
Show/hide version |
showServer(bool $show) |
Show/hide server name |
showCopyright(bool $show) |
Show/hide copyright |
tenantResolver(Closure $resolver) |
Custom tenant resolver for logging |
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security-related issues, please email security@d3s.com.br instead of using the issue tracker.
Credits
License
MIT License. See LICENSE for more information.
d3s-datasapiens/filament-server-indicator 适用场景与选型建议
d3s-datasapiens/filament-server-indicator 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 13 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 12 月 02 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「server」 「laravel」 「footer」 「indicator」 「load-balancer」 「filament」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 d3s-datasapiens/filament-server-indicator 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 d3s-datasapiens/filament-server-indicator 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 d3s-datasapiens/filament-server-indicator 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A lightweight and powerful OAuth 2.0 authorization and resource server library with support for all the core specification grants. This library will allow you to secure your API with OAuth and allow your applications users to approve apps that want to access their data from your API.
Allow html tags in footer copyright text
Provides per-namespace and per-page header and footer inclusion
A Filament plugin to add a customizable copyright footer to all panels
Yii2: Sticky Footer
A jQuery augmented PHP library for creating and validating HTML forms
统计信息
- 总下载量: 13
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 20
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-12-02