ferarandrei1/filament-dynamic-settings
最新稳定版本:v2.0.0
Composer 安装命令:
composer require ferarandrei1/filament-dynamic-settings
包简介
Centralized dynamic settings system for Filament
README 文档
README
Centralized dynamic settings system for Filament with enum-driven setting management.
Installation
Install the package via composer:
composer require ferarandrei1/filament-dynamic-settings
Publish the migration file:
php artisan vendor:publish --tag=filament-dynamic-settings-migrations
Run the migrations:
php artisan migrate
Quick Start
The package automatically registers two settings pages in your Filament panel:
- General Settings - Manage domain settings, logo, and favicon
- Homepage Settings - Configure homepage content, social media links, and contact information
Basic Usage
use Feraandrei1\FilamentDynamicSettings\Models\Setting; use Illuminate\Support\Facades\Auth; // Create or update a setting Setting::updateOrCreate( [ 'uploaded_by_user_id' => Auth::id(), 'group' => 'general', 'name' => 'logo', ], ['payload' => $logoData] ); // Retrieve settings $settings = Setting::where('uploaded_by_user_id', Auth::id()) ->where('group', 'general') ->get() ->keyBy('name'); $logo = $settings['logo']->payload ?? null;
Documentation
Learn how to use and extend the package:
-
Using Enums for Type-Safe Settings - Learn how to use enums for type-safe setting management and how to extend them for your custom settings.
-
Creating Custom Settings Pages - Learn how to create custom Filament settings pages or customize the built-in ones.
Features
- Enum-driven setting names and groups for type safety
- Built-in Filament pages for General and Homepage settings
- Database-backed settings storage with user-specific support
- No third-party dependencies
- Easy to extend and customize
Requirements
- PHP 8.1 or higher
- Filament 3.0 or higher
- Laravel 10.0 or higher
License
MIT License
统计信息
- 总下载量: 6
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-12-21
