larapacks/setting
Laravel package for storing and retrieving application settings with a simple API. Manage key/value configuration in your database, access values via helpers or facades, and keep defaults in code while allowing runtime overrides for per-app customization.
.env and config/ without redundancy.Cache facade) for performance.config/setting.php).settings table), but no native support for Redis/other backends.bootstrap/app.php service provider registration).settings table. Migration must be provided or created manually.Cache facade; no custom cache key strategy.| Risk Area | Severity | Mitigation Strategy |
|---|---|---|
| Schema Migrations | High | Pre-validate DB schema or use a seed script. |
| Caching Invalidation | Medium | Implement SettingUpdated event listener. |
| Concurrency Issues | Low | Use Laravel’s database transactions. |
| Deprecation Risk | Low | Monitor Laravel minor version updates. |
| Performance | Low | Benchmark cache hit/miss ratios. |
int, bool) or constraints (e.g., min/max)?null vs. throw exception)?Cache drivers (file, Redis, Memcached).Setting facade in PHPUnit for unit tests..env/config/ usage to identify candidates for dynamic settings.settings table schema (or use package’s default).larapacks/setting).config/app.php.config/setting.php for defaults.Setting::get('key').Setting::remember('key', 60)).bootstrap/app.php changes).settings table requires migrations.null returns requires checking defaults and cache.SettingUpdated events.php artisan setting:list for debugging.Setting::remember()).key column in the settings table.| Scenario | Impact | Mitigation |
|---|---|---|
| Database Down | Settings unavailable | Fallback to .env or config. |
| Cache Failure | Stale settings | Implement cache fallback logic. |
| Concurrent Writes | Data corruption | Use DB transactions. |
| Malicious Setting Updates | App misconfiguration | Add admin-only middleware. |
| Schema Migration Failures | Broken settings access | Backup settings table pre-migration. |
Setting::get/set API and caching.How can I help you explore Laravel packages today?