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 Setting

Laravel Setting Laravel Package

jobmetric/laravel-setting

A Laravel package for managing application settings with a flexible key-value store, letting you define, save, and retrieve configuration values at runtime. Useful for admin-editable options like site name, contact details, and feature toggles without touching config files.

View on GitHub
Deep Wiki
Context7

The best package for saving system settings

Frequently asked questions about Laravel Setting
How do I install jobmetric/laravel-setting in a Laravel application?
Install it with Composer using composer require jobmetric/laravel-setting, then publish the package config file and run the migration that creates the settings table. The package follows the conventional Laravel shape of a service provider, facade, publishable config, and a DB-backed settings table. From there you can read and write settings through the facade or the global helper. If you already have a published config, diff and merge it rather than overwriting it during upgrades.
Does jobmetric/laravel-setting work with config:cache in production?
Settings are stored in the database, so reads should come from the settings store rather than from mutated config values. However, the release notes mention a change to a config cache value, and it is not clear whether that means the cache key, TTL, or default cache store changed. Verify read and write behavior in a sandbox with config:cache enabled before rolling out, because silent staleness is the main risk. Do not build application logic that depends on writing to Laravel's config repository at runtime.
What is the difference between store() and dispatch() in laravel-setting?
Version 1.1.0 renames the public store() method to dispatch(), which is a breaking change shipped in a minor release. Code still calling store() can fail at runtime with a BadMethodCallException, and it may only surface when that specific code path executes. Before upgrading, grep for ->store(, Setting::store, and app(...)->store call sites, and confirm with the maintainer whether store() is retained as a deprecated alias.
Can I change the settings table name used by laravel-setting?
Yes. The table name is exposed in the publishable config file, so you can override it before running the migration. This is purely a configuration concern rather than a schema change, so existing settings tables do not need to be altered just because you rename the configured table. Always run the migration against a scratch database first to confirm the expected table is created.
How do I read a setting value at runtime with laravel-setting?
You can consume settings through the package facade or the global helper function, both of which resolve the underlying settings service. The package also mentions loading settings into a global object, which introduces boot-time global state. For request and test isolation, prefer resolving values on demand through the facade or helper rather than relying on cached global state.
What are the risks of using jobmetric/laravel-setting in production?
The main technical risks are the store() to dispatch() rename in a minor release, unclear config cache semantics, and boot-time global object state that can cause stale values or test isolation problems. There is also a license change of unknown direction, which blocks adoption pending legal review, plus an added global helper that could collide with other packages. Pin to a strict version such as ~1.1.0, review the license, and canary deploy before a broader rollout.
Does jobmetric/laravel-setting support different cache or storage drivers like Redis?
The package is database-backed, and there is no evidence of an abstraction layer over cache or storage drivers. That means settings persistence is assumed to be the database table rather than a pluggable cache backend. The release notes reference a config cache change, so test behavior under array, database, and Redis cache drivers if your application uses them. Treat any caching behavior as something to verify rather than assume.
How do I test code that uses laravel-setting?
Because the package can load settings into a global object at boot, stale values and state leakage between tests are real concerns. Use a fresh application instance per test, reset or truncate the settings table in setup, and confirm how the global object is reset across requests. The notes do not clearly state reset semantics, so make isolation explicit in your test harness rather than depending on implicit behavior.
Which Laravel and PHP versions does laravel-setting support?
Check the composer.json constraints for the exact PHP and Laravel version matrix, since dependency constraints changed in a recent release and it is unclear whether they tightened or loosened. Verify that composer dump-autoload --optimize succeeds with the new global helper in your stack. Also confirm compatibility across the cache drivers your application uses before upgrading.
What should I check before upgrading to laravel-setting 1.1.0?
Treat the license change and the store() to dispatch() rename as blocking checks first, and confirm the maintainer's semver policy. Diff and merge the published config file, run migrations against a scratch database, and execute the full test suite plus a manual config-cache check. Then update all call sites to dispatch(), verify reads, writes, and cache invalidation in a canary deployment, and avoid upgrading multiple services at once. If the license or rename is unacceptable, alternatives include other Laravel settings packages that offer stable public APIs.
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.
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect
youbar/easy-crud
c-point-labs/laravel-hostyourai
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo