ferarandrei1 / filament-dynamic-settings
Centralized dynamic settings system for Filament
Installs: 6
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/ferarandrei1/filament-dynamic-settings
Requires
- php: ^8.1|^8.2|^8.3
- filament/filament: ^3.0
- illuminate/database: ^10.0|^11.0
- illuminate/support: ^10.0|^11.0
Requires (Dev)
- orchestra/testbench: ^8.0|^9.0
- phpunit/phpunit: ^10.0|^11.0
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
