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

Laravel Config Writer Laravel Package

daftspunk/laravel-config-writer

A Laravel package for writing configuration files at runtime. Update config values programmatically and persist them back to your config files with a simple API, so you can manage dynamic settings without editing PHP files by hand. Handy for admin panels and settings screens.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Feature: in-app configuration/settings editor. Enables an admin UI that persists changes to config/*.php (mail driver, queue, cache, third-party API keys, feature toggles) instead of forcing users to SSH in and edit files — a common ask in self-hosted and on-prem products.
  • Feature: installation / onboarding wizards. Multi-step setup flows (database, mail, storage, license key) that need to write a final config file at the end, without hand-rolling a tokenizer.
  • Build vs buy. The core value here is file integrity: preserving comments, ordering, and formatting while writing. Replicating that safely (tokenizer, atomic writes, escaping, array nesting) is roughly 2–4 engineering days plus ongoing edge cases. This package collapses that to a composer require and a thin service wrapper.
  • Roadmap input for a "settings management" epic. Forces the strategic question early: is the source of truth a config file (ops-friendly, git-tracked, single-tenant) or a database table (multi-tenant, auditable, concurrent-safe)? This package only serves the first branch, so it should be scoped to the self-hosted/on-prem track, not the cloud track.
  • Use cases that genuinely fit: self-hosted/open-source distributions, license key entry, environment-specific driver selection, per-install branding (logo path, theme, locale defaults), and developer-facing "generate my config" tooling.
  • Use cases this should not anchor: multi-tenant SaaS settings, high-frequency writes, secrets, anything needing audit history or rollback — those are a database-settings decision, and choosing this package would anchor the roadmap to the wrong architecture.

When to Consider This Package

Consider it when:

  • Config files are a legitimate, intended source of truth — self-hosted installs, single-tenant deployments, or open-source apps where users already expect to see config/*.php.
  • The write path is low-frequency and human-initiated (an admin clicking Save), not per-request or per-tenant.
  • Preserving comments and formatting matters because the files are version-controlled or documented.
  • You control the filesystem (writable config/ directory, no immutable container images) and can tolerate clearing the config cache after a write.
  • You've verified compatibility with your Laravel version — last release was August 2023 and the project has ~176 stars, so treat maintenance as a real risk and pin the version.

Look elsewhere when:

  • config:cache is part of your deploy. Runtime writes are invisible until the cache is rebuilt; you must call config:clear/config:cache after every save, which is fragile and slow. If that coupling is unacceptable, use a database-backed settings package (e.g. spatie/laravel-settings) and read through config.
  • You run multiple app servers or containers. File writes don't propagate; you get divergent config per node. Use a shared store.
  • You need concurrency safety, validation, audit trails, or rollback. File writes are last-writer-wins with no transaction semantics.
  • You're storing secrets. Config files land in backups, repos, and container layers. Prefer a secrets manager or environment injection.
  • You're on Octane or read-only/ephemeral filesystems without a persistence plan.
  • Maintenance risk is disqualifying for a long-lived product — in that case, vendor/fork it internally or budget the 2–4 days to build a minimal writer you own.

How to Pitch It (Stakeholders)

To executives: This is a small, low-cost dependency that unblocks a frequently requested capability — letting customers configure the product from the UI instead of editing files on the server. Integration cost is roughly a one-day spike; the package is MIT-licensed and niche (176 stars). The trade-off is maintenance risk: it hasn't shipped since August 2023, so I'd recommend a time-boxed spike, a pinned version, and a documented fallback to database-backed settings if it breaks. Upside is limited to our self-hosted/on-prem track — it does not advance the multi-tenant cloud roadmap, so I'd fund it as a scoped enabler, not a strategic bet.

To engineering: It solves the annoying part — writing PHP config arrays back to disk while preserving comments, ordering, and formatting — so we don't hand-roll a tokenizer. Two non-negotiables if we adopt it: (1) every write must be followed by config cache invalidation, and (2) we wrap it behind our own SettingsWriter interface so we can swap in a DB-backed implementation later without touching call sites. Please confirm Laravel 11/12 compatibility and file-permission behavior in our deployment target during the spike.

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.
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
frankyso/ipaymu
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core