Lab
Laravel Settings Kit
Laravel Settings Kit is a package for managing settings and preferences in Laravel applications, with multilingual support and a REST API for headless applications.
It allows defining global values with user-specific overrides (users inherit the global value until they personalize it), automatic preference creation with type detection, batch operations, and full REST API access for JavaScript apps, mobile apps and SPAs.
Key features
- Two-level settings: Global defaults with optional per-user overrides, with no extra queries for users who haven't customized anything
- Auto-creation: Automatically creates preferences with type detection (boolean, integer, JSON, string)
- Batch operations: Read or update multiple settings in a single call
- Multilingual support: Translatable titles and descriptions for each setting, with locale fallback
- Role-based visibility: Tag settings with a role to control who can see them
- Full REST API: Endpoints for headless applications with token, Sanctum or Passport authentication
- Events: A
SettingUpdatedevent fires on every write, useful for audit logging - Blade directive:
@setting('key')to output values directly in templates - Artisan commands: List, export and import settings, and clear the cache
- Built-in cache: Every read is cached, configurable via TTL and prefix
Requirements
PHP 8.1 or higher and Laravel 9 or higher.
Have an idea or want to collaborate?
Have an idea, want to team up on a project, or just want to talk tech? Drop us a line. We love meeting people who want to build things.
Let's talk