Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Filament Settings Hub Laravel Package

tomatophp/filament-settings-hub

Manage your Filament app settings with a GUI and helper functions. Install via Composer, run the install command, and register the plugin in your panel provider. Use the setting() helper to read values, and register new settings pages using the SettingHold facade.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture Fit

  • Filament Integration: The package is explicitly designed for Filament (Laravel admin panel), leveraging its plugin system to provide a GUI-driven settings management layer. This aligns well with Laravel-based applications using Filament for admin interfaces.
  • Modularity: The package abstracts settings storage and exposes a clean API for defining, retrieving, and updating settings. The v5.0.1 release reinforces this: the new color settings live in a dedicated site_colors settings group, demonstrating clean namespacing/isolation — a strong signal for modular Laravel architectures where configuration is dynamic or environment-specific.
  • Separation of Concerns: Encourages decoupling of settings logic from business logic, improving maintainability in large applications. New settings are consumed via a global setting() helper (e.g. setting('site_primary_color')), keeping call sites terse but introducing a global-scope function to be aware of.

Integration Feasibility

  • Low-Coupling: Uses Filament’s plugin system, meaning it can be added without modifying core application logic. The v5.0.1 color feature is strictly opt-in (->allowColorSettings()), so existing installs are unaffected — good backwards-compatibility discipline.
  • Database/Config Agnostic: Likely supports both database-backed settings (via Eloquent) and config-file-based storage, offering flexibility.
  • Migration Ergonomics: The filament-settings-hub:install command now publishes each settings migration only once, so re-running it no longer creates duplicate migrations. This materially improves the install/upgrade story for iterative deployments and CI pipelines.
  • Validation & Type Safety: Supports Laravel validation rules and type casting, reducing runtime errors.
  • New Opt-In Migration Cost: Enabling color settings requires running php artisan filament-settings-hub:install plus php artisan migrate — minor, but must be sequenced into the deployment runbook.

Technical Risk

  • Filament Dependency: Tight coupling with Filament means migration risk if switching admin panels (e.g., to Nova or Backpack).
  • Limited Adoption: 0 dependents suggests unproven long-term stability (though MIT license mitigates risk). The package is now on the 5.x line; confirm the exact Filament/Laravel constraint matrix in composer.json against your stack before upgrading.
  • Undocumented Edge Cases: Screenshots show a clean UI, but no public API docs—could lead to hidden complexities in customization.
  • Theme Read Frequency: Because color settings surface through setting('site_primary_color'), expect reads on every page render if wired into layouts — this raises the importance of caching (see Operational Impact).
  • Migration Drift: The v5.0.1 fix removes the duplicate-migration hazard, but teams must still verify the new site_colors migration is applied in each environment after enabling the feature.

Key Questions

  1. Storage Backend: Does it support database + config-file hybrid storage, or is it one or the other?
  2. Multi-Tenant Support: Can settings (including color/theme groups) be scoped per tenant (critical for SaaS apps)?
  3. Real-Time Updates: Does it support WebSocket/Livewire updates for dynamic settings changes?
  4. Access Control: How are permission-based settings handled — e.g. should the new color page be gated to specific admin roles?
  5. Migration Path: What’s the easiest way to migrate existing config/database settings into the hub?
  6. Caching Contract: Is there a built-in cache/invalidation story for high-traffic settings like theme colors, or is it left to the host app?
  7. Testing Coverage: Are there pre-built tests for custom setting definitions (e.g. the new site_colors group as a reference implementation)?
  8. Localization: Does it support multi-language settings (e.g., for global apps)?

Integration Approach

Stack Fit

  • Primary Use Case: Ideal for Laravel + Filament applications needing admin-configurable settings (e.g., feature flags, API keys, UI themes). v5.0.1 now ships first-class theme color management, directly covering the UI-theme use case previously listed as aspirational.
  • Compatibility:
    • Laravel 10+, PHP 8.1+ (verify against the current 5.x composer.json).
    • Filament: built as a Filament plugin; confirm the supported Filament major(s) for 5.x.
    • Database: Works with MySQL, PostgreSQL, SQLite (via Eloquent).
    • Caching: Can integrate with Redis/Memcached for performance — now more relevant given theme reads.
  • Alternatives Considered:
    • spatie/laravel-settings: More generic, but lacks Filament UI.
    • Custom Config + Filament Forms: More work, less abstraction.

Migration Path

  1. Assessment Phase:
    • Audit existing settings (config files, database tables, environment variables).
    • Map to the package's schema (e.g., SettingGroup, Setting models).
  2. Pilot Integration:
    • Start with non-critical settings (e.g., UI toggles) to test the package.
    • Use Filament’s plugin system to isolate the hub.
  3. Theme Feature Rollout (v5.0.1):
    • Enable with ->allowColorSettings(), run php artisan filament-settings-hub:install and php artisan migrate.
    • The new migrations land in the dedicated site_colors group, so existing apps are untouched until opted in.
    • Wire setting('site_primary_color') (and secondary/tertiary) into blade/layout CSS variables.
  4. Full Migration:
    • Database: Export existing settings to the hub’s tables.
    • Config Files: Replace static config with dynamic settings.
    • Environment Variables: Deprecate in favor of GUI-managed settings.
  5. Fallback Plan:
    • Maintain legacy config fallback during transition.
    • Use the package’s fallback mechanism (if available) for missing settings — important if a color migration is skipped in one environment.

Compatibility

  • Filament Plugins: Works seamlessly with Filament’s plugin ecosystem.
  • Laravel Services: Can integrate with Laravel’s service container for dependency injection.
  • Third-Party Packages: May conflict if they override Filament’s config or use duplicate setting keys. The new site_colors namespace reduces collision risk for theme values specifically.
  • Version Pinning: Lock to a specific minor version — the 5.x line is active — to avoid breaking changes.

Sequencing

  1. Setup:
    • Install via Composer: composer require tomatophp/filament-settings-hub.
    • Publish assets/config: php artisan vendor:publish --tag="settings-hub-config".
  2. Define Settings:
    • Register settings in the service provider (e.g., Settings::group('app')->add('theme', 'dark')).
  3. UI Integration:
    • Add the hub to Filament’s navigation via SettingsHub::make().
    • Optionally invoke ->allowColorSettings() to surface the new site-colors page.
  4. Testing:
    • Validate CRUD operations via Filament’s UI and the setting() accessor.
    • Re-run filament-settings-hub:install in a throwaway environment to confirm idempotent migration publishing (the v5.0.1 fix).
  5. Deployment:
    • Roll out in stages (dev → staging → production); include migrate in release steps when enabling color settings.

Operational Impact

Maintenance

  • Pros:
    • Centralized Management: All settings in one GUI, reducing config file sprawl.
    • Version Control: Changes logged via Filament’s audit logs (if enabled).
    • MIT License: No vendor lock-in; can fork if needed.
    • Active Release Cadence: v5.0.1 shows the package is actively maintained (feature + bugfix in a patch), and the install-command fix reduces maintenance friction.
  • Cons:
    • Dependency Updates: Must sync with Filament updates (risk of breaking changes).
    • Custom Logic: Extending functionality may require monkey-patching or forks.
  • Tooling:
    • GitHub Actions: Existing CI/CD pipelines cover PHP styling and tests.
    • Laravel Forge/Envoyer: Easy deployment for managed Laravel hosts.

Support

  • Community:
    • Limited Activity: Low star count and no active discussions—support may require self-service or paid Filament experts. The v5.0.1 credit to an external contributor is an encouraging signal of community engagement.
    • Documentation: README is basic; expect trial-and-error for edge cases.
  • SLAs:
    • No official support: Rely on GitHub issues or Filament’s community.
    • Workaround Plan: Maintain backup config files for critical settings.

Scaling

  • Performance:
    • Database Load: Frequent setting reads can bloat queries (mitigate with caching). Theme colors are a per-request read if wired into layouts — cache the resolved palette aggressively.
    • UI Responsiveness: Filament’s reactivity may lag with 100+ settings (test with load testing).
  • Horizontal Scaling:
    • Stateless Settings: Works well in multi-server setups (settings stored in DB).
    • Cache Invalidation: Ensure Redis invalidation on setting updates, especially for theme colors where stale cache is immediately visible to end users.
  • Enterprise Considerations:
    • Multi-Region: May need database replication for low-latency access.
    • High Availability: Test failover scenarios for setting storage.

Failure Modes

Failure Scenario Impact Mitigation
Database downtime Settings unavailable Use config file fallback
Filament plugin conflict UI breaks Isolate hub in a dedicated plugin
Permission misconfiguration Unauthorized setting changes (incl. theme) Integrate with Filament’s policies; gate the colors page
Migration corruption Lost settings Backup DB before migration
Duplicate migrations on re-install Schema drift / noisy migrations Resolved in v5.0.1 — re-run install safely
Color feature enabled, migrate skipped setting('site_primary_color') returns null Add release-step check; provide fallback palette
Package abandonment No future updates Fork and maintain

Ramp-Up

  • Learning Curve:
    • Easy for Filament Users: Familiar UI patterns.
    • Moderate for Customization: Requires Laravel/Eloquent knowledge for advanced setups; theme-color wiring requires a small amount of CSS-variable plumbing in the front end.
  • Onboarding Steps:
    1. Watch Filament Tutorials: Understand the plugin system.
    2. Review Package Tests: Learn expected behavior.
    3. Start Small: Migrate one setting group first; enable the color page as a low-risk pilot since it is opt-in and isolated to its own group.
  • Training:
    • Internal Docs: Document custom setting definitions and the theme-color consumption pattern for the team.
    • Pair Programming: Collaborate with a Filament expert for complex setups.
  • Time Estimate:
    • Basic Setup: 2–4 hours.
    • Enabling v5.0.1 Color Settings: ~1 hour (config flag, install, migrate, wire CSS variables).
    • Full Migration: 1–2 days (depends on existing config complexity).
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
gmostafa/php-graphql-client
xeviant/paystack
snowsoft/faker
meditationsteps/blogetc
animalyoung/laravel-influxdb
onix-solutions/sms-telera
lonely-lights/prosetta
oxygen/data
oxygen/core
jengo/base
xiloryx/log-collector
a21ns1g4ts/filament-stripe
la-php/laravel-admin
artisan-build/community-prompts
vleroy/smart
ayles-software/laravel-australian-public-holidays
cboxdk/laravel-id-spatie
cboxdk/laravel-id-billing
cboxdk/laravel-id-billing-bridge
simple-as-fuck/php-performance-log