Weave Code
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

Laravel Settings Laravel Package

spatie/laravel-settings

Strongly typed application settings for Laravel. Define settings classes with typed properties, store values in a repository (database, Redis, etc.), inject settings via the container, and update them easily with $settings->save().

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Centralized Configuration Management: Replace scattered .env variables, hardcoded values, or third-party config services (e.g., AWS Parameter Store) with a type-safe, structured settings system tied to Laravel’s dependency injection. Enables teams to manage app-wide settings (e.g., feature flags, API keys, UI toggles) in a single, version-controlled location.
  • Feature Flagging & Dynamic Behavior: Build a self-service toggle system for engineers to enable/disable features (e.g., new_payment_flow_enabled) without code deployments. Integrate with analytics to track adoption.
  • Multi-Tenant Isolation: Store tenant-specific settings (e.g., tenant_branding_colors) in the same system, with repositories per tenant or shared defaults. Reduces boilerplate for tenant-aware logic.
  • Data-Driven Personalization: Serve dynamic content (e.g., homepage_banner_text) based on user segments or A/B test variants, with settings updated via admin panels.
  • Build vs. Buy: Avoid custom solutions for settings management (e.g., rolling your own Redis-backed config store). This package provides batteries-included features (migrations, caching, validation) with minimal maintenance overhead.
  • Roadmap Prioritization:
    • Phase 1: Replace .env for non-sensitive, app-wide settings (e.g., MAX_UPLOAD_SIZE).
    • Phase 2: Implement feature flags for high-impact features (e.g., dark mode, experimental APIs).
    • Phase 3: Extend to multi-tenant or user-specific settings (e.g., profile customization).

When to Consider This Package

  • Look Here If:

    • Your app uses scattered configuration (.env, static classes, or external services) that’s hard to audit or update.
    • You need strong typing for settings (e.g., bool $dark_mode_enabled) to catch errors at compile time.
    • Settings require migrations (e.g., adding a new field to FeatureFlags after launch).
    • You want admin panels to update settings without redeploying (e.g., marketing teams tweaking promo_banner_copy).
    • Your team uses Laravel and prefers PHP-first solutions over JavaScript-based config tools (e.g., RedwoodJS’s prism).
  • Look Elsewhere If:

    • You need real-time sync across regions (e.g., global config updates). Consider Redis-backed solutions (this package supports Redis but may not fit high-frequency use cases).
    • Settings require fine-grained access control (e.g., per-user permissions). Pair with Laravel’s Policies or use a dedicated tool like Casbin.
    • You’re not using Laravel (though the underlying logic could be adapted to other PHP frameworks).
    • Your settings are extremely high-volume (e.g., per-request dynamic values). This package is optimized for structured, infrequently updated settings.

How to Pitch It (Stakeholders)

For Executives:

*"This package lets us centralize and control app-wide settings—like feature toggles, UI themes, or API keys—without scattered .env files or manual database updates. It’s like Git for configuration: version-controlled, type-safe, and deployable via migrations. For example, we could:

  • Launch features gradually (e.g., ‘new checkout flow’) with a toggle, then analyze impact before full rollout.
  • Let marketing update promotions (e.g., banner text) via an admin panel, not engineers.
  • Reduce outages by validating settings at runtime (e.g., catching null values for required APIs). It’s a low-risk, high-reward upgrade that pays off in maintainability and speed."*

For Engineers:

*"This replaces ad-hoc config management with a Laravel-native, migration-friendly system. Key wins:

  • Type Safety: No more isset($config['feature_flag']) hacks—settings are strongly typed (e.g., bool $dark_mode).
  • Admin-Friendly: Generate CRUD panels for settings in minutes (e.g., php artisan make:setting FeatureFlags + Laravel Nova/Backpack integration).
  • Multi-Repo Support: Store settings in database (for persistence) or Redis (for speed), with fallbacks.
  • Zero Boilerplate: Settings auto-register, cache, and validate. Example:
    // Define once:
    class AppSettings extends Settings {
        public string $api_key;
        public bool $maintenance_mode;
    }
    // Use anywhere:
    $settings = app(AppSettings::class);
    if ($settings->maintenance_mode) return view('maintenance');
    

Tradeoff: Adds a migration step for schema changes, but eliminates ‘works on my machine’ config issues."*

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.
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge
l3aro/rating-star-for-filament
leek/filament-subtenant-scope
anil/file-picker
broqit/fields-ai