imnpc/filament-settings
Composer 安装命令:
composer require imnpc/filament-settings
包简介
This package adds a way to interact with outerweb/settings in Filament.
README 文档
README
This package adds a way to interact with outerweb/settings in Filament.
Installation
You can install the package via composer:
composer require imnpc/filament-settings
Configure the Outerweb/Settings package as described in the Settings documentation.
Add the plugin to your desired Filament panel:
use Outerweb\FilamentSettings\Filament\Plugins\FilamentSettingsPlugin; class FilamentPanelProvider extends PanelProvider { public function panel(Panel $panel): Panel { return $panel // ... ->plugins([ FilamentSettingsPlugin::make() ->pages([ // Add your own setting pages here ]) ]); } }
Usage
Create a settings page at 'app/Filament/Pages/Settings/Settings.php':
namespace App\Filament\Pages\Settings; use Closure; use Filament\Forms\Components\Tabs; use Filament\Forms\Components\TextInput; use Outerweb\FilamentSettings\Filament\Pages\Settings as BaseSettings; class Settings extends BaseSettings { public function schema(): array|Closure { return [ Tabs::make('Settings') ->schema([ Tabs\Tab::make('General') ->schema([ TextInput::make('general.brand_name') ->required(), ]), Tabs\Tab::make('Seo') ->schema([ TextInput::make('seo.title') ->required(), TextInput::make('seo.description') ->required(), ]), ]), ]; } }
Register the setting page in the FilamentServiceProvider:
use Outerweb\FilamentSettings\Filament\Plugins\FilamentSettingsPlugin; class FilamentPanelProvider extends PanelProvider { public function panel(Panel $panel): Panel { return $panel // ... ->plugins([ FilamentSettingsPlugin::make() ->pages([ App\Filament\Pages\Settings\Settings::class, ]) ]); } }
You can add as many setting pages as you want. But when you do, make sure to override the public static function getNavigationLabel() : string method on your settings page. This is because multiple pages with the same navigation label will override each other in the Filament navigation.
Changing the navigation label
You can change the navigation label by overriding the getNavigationLabel method:
namespace App\Filament\Pages\Settings; use Outerweb\FilamentSettings\Filament\Pages\Settings as BaseSettings; class Settings extends BaseSettings { public static function getNavigationLabel(): string { return 'Custom label'; } }
Changing the page title
You can change the page title by overriding the getTitle method:
namespace App\Filament\Pages\Settings; use Outerweb\FilamentSettings\Filament\Pages\Settings as BaseSettings; class Settings extends BaseSettings { public function getTitle(): string { return 'Custom title'; } }
Changelog
Please see CHANGELOG for more information on what has changed recently.
Credits
License
The MIT License (MIT). Please see License File for more information.
imnpc/filament-settings 适用场景与选型建议
imnpc/filament-settings 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.15k 次下载、GitHub Stars 达 2, 最近一次更新时间为 2025 年 08 月 05 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 imnpc/filament-settings 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 imnpc/filament-settings 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 1.15k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 5
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-08-05