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 Model Settings Laravel Package

glorand/laravel-model-settings

Add flexible, persistent settings to any Laravel Eloquent model. Choose field, table, or Redis storage drivers or write your own, define defaults, and get, set, check, and remove per-model settings with a simple API. Requires PHP 8.2+ and Laravel 12+.

View on GitHub
Deep Wiki
Context7
9.0.0

Added

  • Single HasSettings trait with configuration-driven driver selection (MODEL_SETTINGS_DRIVER env / driver config / per-model $settingsDriver property)
  • SettingsManagerFactory singleton with extend() for registering custom drivers at runtime
  • Driver-scoped config: driver-specific keys live under drivers.<name>.*
  • Optional Redis driver options: drivers.redis.connection (named connection) and drivers.redis.key_prefix

Changed (BREAKING)

  • Removed the HasSettingsField, HasSettingsTable and HasSettingsRedis traits - see MIGRATION_GUIDE_8_to_9.md
  • Removed the flat settings_* config keys (env variable names are unchanged)
  • Requires PHP ^8.2 and Laravel 12/13 (drop Laravel 10/11, PHP 8.1)
  • Mutations (set, update, delete, setMultiple, deleteMultiple) persist only the stored overrides - defaults are no longer copied into storage; validation runs against the effective (default-merged) result
  • The table and redis drivers throw ModelSettingsException when the model has no primary key yet
  • The redis driver deletes the storage key when settings are cleared instead of storing an empty array

Fix

  • The field driver's internal schema-check cache key now includes the table name (two models on different tables no longer share one cached result)
8.0.1

Added

  • Rename HasSettings::getRules to HasSettings::getSettingsRules
8.0.0

Added

  • Add support for Laravel 12
7.0.0

Added

  • Add support for Laravel 11
  • 8.1 min. php version
5.0.0

Added

  • Add support for Laravel 9 by @belzaaron
  • DROP Laravel 7,8 support
  • 8.0 min. php version
4.4.1

Fix

  • fix validation variable name
4.4.0

Added

  • Validation system for settings data
4.3.0

Added

  • Using another method name other than settings()
4.2.2

Fix param type

4.2.1

Added

  • PHP8 support
4.2.0

Added

  • Refactor the work with default settings (flatten arrays)
4.1.0

Added

  • Refactor unit tests
4.0.2

Added

  • Setup connection of the model in HasSettingsTableTrait
4.0.1

Added

  • Update README
4.0.0

Added

  • Add support for Laravel 8
  • Drop support for Laravel 5.8 and lower
  • Drop support for PHP 7.1 and lower
3.7.0

Added

  • HasSettingsField now adheres to $connection override on model Ref. task
3.6.7

Fix

  • code refactor
3.6.6

Fix

  • default configs for a table in model_settings.php config file
3.6.5

Fix

  • code refactor
  • use Cache facade instead of cache() helper function
3.6.4

Fix

  • github actions
3.6.3

Fix

  • "empty()" - to check if the model has empty setting
3.6.2

Fix

  • "exist()" - to check if the model has valid setting
3.6.0
  • add support for Laravel 7
3.5.5

Bugfix

3.5.1

Fix

  • Check column settings exists directly on the database table
3.5.0

Added

  • Use cache in case of Table Settings Ref. task
  • Refactor
3.4.2

Added

  • Manage array type settings
3.4.1

Added

  • Redis support
3.3.0

Added

  • Default settings on Model
3.2.0

Added

  • Compatibility with PSR-16, CacheInterface
3.1.1

Added

  • Test for console commands
3.1.0

Added

  • Configure persistence for settings in case of Field Type (HasSettingsField)
3.0.0

Added

  • Command to create the table for settings
  • Dynamic name for the settings table and field
2.0.0

Added

  • Console Commands
1.0.0

Added

  • Initial release
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.
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core