承接 d3s-datasapiens/filament-server-indicator 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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 我们能提供哪些服务?
定制开发 / 二次开发

基于 d3s-datasapiens/filament-server-indicator 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 13
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 20
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-12-02