Download the PHP package laravel-settings/settings without Composer
On this page you can find all versions of the php package laravel-settings/settings. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download laravel-settings/settings
More information about laravel-settings/settings
Files in laravel-settings/settings
Package settings
Short Description Simple settings management package for Laravel
License MIT
Homepage https://github.com/laravel-settings/settings
Informations about the package settings
Laravel Settings
A flexible and powerful settings management package for Laravel applications. Store and retrieve settings using an Eloquent-like syntax with support for multiple storage drivers and multilingual values.
Features
- Simple, expressive Eloquent-like syntax (
where,groupBy,sort,search, ...) - Supports multiple data types: arrays, strings, nested objects
- Supports multiple storage drivers:
database,file,redis,cache,session - Multilingual / localization support
- Blade directives for easy use in views
- CRUD operations:
save,create,update,delete
Requirements
- PHP >= 8.1
- Laravel >= 10.x
Installation
Install the package via Composer:
Publish Migrations
Publish Config
Run Migrations
Configuration
After publishing, open config/settings.php to choose your preferred driver:
Supported drivers: database, file, redis, cache, session
Basic Usage
Save Settings
Retrieve Settings
Create
Update a Specific Field
Delete
Nested Data
Store and access deeply nested values using dot notation:
Working with Lists
Store and manipulate a list of items:
Eloquent-like Methods
sort()
Sort items by any field, ascending or descending:
groupBy()
Group items by a shared key:
where()
Filter nested items by a key/value pair:
search()
Search nested keys by a partial string match:
Multilingual Support
Store values in multiple locales and retrieve them by locale:
Pass a locale as the second argument to resolve values automatically:
Works the same with lists of items:
Blade Directives
@setting
Output a single field value:
@eachSetting / @endEachSetting
Loop over a list of settings. The default variable is $item if no alias is provided:
File / Image Storage
Available Drivers
| Driver | Description |
|---|---|
database |
Stores settings in a database table (default) |
file |
Stores settings as JSON files |
redis |
Stores settings in Redis |
cache |
Stores settings using Laravel Cache |
session |
Stores settings using Laravel session |
License
This package is open-sourced software licensed under the MIT license.