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+.
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 runtimedrivers.<name>.*drivers.redis.connection (named connection) and drivers.redis.key_prefixHasSettingsField, HasSettingsTable and HasSettingsRedis traits - see MIGRATION_GUIDE_8_to_9.mdsettings_* config keys (env variable names are unchanged)set, update, delete, setMultiple, deleteMultiple) persist only the stored overrides - defaults are no longer copied into storage; validation runs against the effective (default-merged) resulttable and redis drivers throw ModelSettingsException when the model has no primary key yetredis driver deletes the storage key when settings are cleared instead of storing an empty arrayHow can I help you explore Laravel packages today?