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

Laravel Config Laravel Package

tarfin-labs/laravel-config

Manage Laravel configuration dynamically. This package lets you store and retrieve config values from the database, override defaults at runtime, and keep application settings organized through a simple, cache-friendly API. Useful for admin-editable settings and environment-specific overrides.

View on GitHub
Deep Wiki
Context7

Key value config management for Laravel

Frequently asked questions about Laravel Config
How do I install tarfin-labs/laravel-config in a Laravel application?
Install it with Composer using composer require tarfin-labs/laravel-config. Laravel's package auto-discovery should register the service provider, but check the README for any manual provider or facade registration. Because values are stored in the database, you will most likely need to publish and run the package migrations with vendor:publish and php artisan migrate. Confirm the exact publish tags in the repository before rolling it out.
Which Laravel and PHP versions does laravel-config support?
The 6.1.0 release is the first to declare Laravel 13 support, arriving as a minor bump from 6.0.0. That minor versioning implies no intentional breaking API change, but it also means Laravel 13 support is new and lightly exercised. The PHP floor is not documented in the changelog, so check the composer.json require block on the 6.1.0 tag before upgrading, especially since Laravel 13 raises the minimum PHP version. Verify Laravel 11 and 12 compatibility against the maintainer's test matrix if you are not on 13.
Is laravel-config compatible with config:cache and cached configuration?
The package advertises a cache-friendly API, but cached configuration is exactly where config-layer packages tend to break subtly. Before relying on it, run a full round trip in your application: php artisan config:cache, boot the app, read and write values, then php artisan config:clear. Confirm that database-backed values are resolved correctly on a cold boot with a compiled config cache present. Treat this as a required smoke test rather than an assumption.
Can I use laravel-config for admin-editable application settings?
Yes, that is the primary use case described by the package: storing and retrieving config values from the database so non-developers can change settings without a deploy. You get a simple key-value API plus runtime overrides of your defaults. Keep in mind that anything read from the database at boot becomes a runtime dependency, so pair writes with cache invalidation in your admin UI.
Does laravel-config replace Laravel's native config() helper and config files?
It is intended to decorate Laravel's configuration layer rather than replace it: your config files stay as defaults, and the package layers database-stored values and runtime overrides on top. Precedence is the detail that matters, so read the source or README to confirm exactly which lookup wins when a key exists in both a config file and the database. Avoid introducing a second in-house config abstraction alongside it, because two layers will fight over precedence.
How does laravel-config handle environment-specific overrides?
The package is described as supporting environment-specific overrides, so you can keep different stored values per environment while sharing the same application code. In practice this usually means scoping rows by environment or by a key prefix in your own schema usage. Check whether scoping is built in or something you configure yourself before designing your settings table.
Does laravel-config work with Laravel Octane and long-running queue workers?
This is a real risk area for any config-layer package. Octane and long-running workers read configuration once at boot and keep it in memory, so a value changed in the database may not be visible to a worker until it restarts or the package cache is refreshed. Test an update-then-read cycle under Octane and under a queue worker before depending on it. If changes must propagate immediately, plan an explicit cache-busting or restart step.
What happens if the database is unavailable, and is laravel-config safe in production?
Because values live in the database, reading them adds a database dependency to the configuration path, which can matter during bootstrap or when the database is degraded. Caching mitigates this, but you should understand whether a cache miss triggers a query at boot. Load-test a cold cache and a failed-connection scenario in staging. Also review the repository's issue tracker and any security policy before putting admin-editable settings behind it.
How do I upgrade laravel-config from 6.0.0 to 6.1.0?
Treat it as a routine minor upgrade: bump the version constraint, run composer update, clear compiled config and application caches, then smoke-test boot. No schema or data migration is expected between these minors, since 6.1.0 is a compatibility-widening release rather than a feature redesign. If you are also moving to Laravel 13 at the same time, do the two upgrades in separate steps so you can isolate any failure.
What are the alternatives to laravel-config for storing settings in the database?
The closest well-known option is spatie/laravel-settings, which offers typed settings classes and a similar database-backed model. The other common route is a small in-house settings table with its own cache layer, which avoids an extra dependency but costs maintenance. If your values rarely change and do not need admin editing, plain config files plus environment variables remain the simplest and fastest option.
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.
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib