Download the PHP package kolirt/laravel-settings without Composer
On this page you can find all versions of the php package kolirt/laravel-settings. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download kolirt/laravel-settings
More information about kolirt/laravel-settings
Files in kolirt/laravel-settings
Package laravel-settings
Short Description Package for settings
License MIT
Homepage https://github.com/kolirt/laravel-settings
Informations about the package laravel-settings
Laravel Settings
Package for managing settings in a Laravel projects
Structure
- Getting started
- Requirements
- Installation
- Setup
- Compatibility with Laravel Octane
- Methods
- Set value
- Get all values
- Get value
- Delete value
- Flush cache
- Console commands
- FAQ
- License
- Other packages

Getting started
Requirements
- PHP >= 8.1
- Laravel >= 10
For lesser versions of Laravel or PHP, use the v1
Installation
Setup
Compatibility with Laravel Octane
To ensure proper operation with Laravel Octane (RoadRunner or Swoole) and state synchronization across workers:
- Use a shared cache store (e.g., 'redis') in
config/cache.php
or viaCACHE_STORE=redis
in.env
. -
Add
\Kolirt\Settings\Core\Setting::class
to the warm array inconfig/octane.php
to initialize the singleton at worker startup: -
Add
\Kolirt\Settings\Octane\FlushSettings::class
to thelisteners[OperationTerminated::class]
array inconfig/octane.php
to reset internal state after each request: - Restart Octane after changes:
php artisan octane:reload
.
This ensures settings are reloaded from the shared cache or database for each request, keeping workers synchronized.
Console commands
settings:install
- Install settings packagesettings:publish-config
- Publish the config filesettings:publish-migrations
- Publish migration filessettings:flush-cache
- Flush cache
Methods
set
The set
method is used to set a value in the settings
all
The all
method is used to get all settings
get
The get
method is used to get a value from the settings
delete
The delete
method is used to delete a value from the settings
flushCache
The flushCache
method is used to flush the cache
FAQ
Check closed issues to get answers for most asked questions
License
MIT
Other packages
Check out my other packages on my GitHub profile