Search by

qiick / laravel-settings

LucaGiardi20

Scoped, typed settings and encrypted secrets for qiick Laravel products.

Package info

github.com/qiick-io/laravel-settings

pkg:composer/qiick/laravel-settings

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 13

dev-develop 2026-11-25 18:01 UTC

README

Scoped, typed settings and encrypted secrets for qiick Laravel products.

The package is under development. It provides the settings table, Laravel package discovery, publishable configuration and the settings:check deploy command.

Requirements

PHP 8.3 or later in the 8.x series, and Laravel 12 or 13.

Configuration

Publish the configuration if the application needs to override a default. Run the migrations before the deploy check.

php artisan vendor:publish --tag=settings-config
php artisan migrate
php artisan settings:check

Declaring settings

Implement Qiick\Settings\SettingsSchema and tag the implementation in your Laravel service provider with SettingsSchema::class. Declare each setting key once across all tagged schemas.

return [
    Definition::bool('two_factor_required')->default(false),
    Definition::json('sidebar_modules')->default(fn () => ['overview' => true]),
    Definition::enum('password_policy', PasswordPolicy::class)->default(PasswordPolicy::Required),
    Definition::string('oidc_client_secret')->secret(),
];

Definitions use the app group and allow only the instance scope by default. Use in() and scopes() to opt into other groups and scopes. Closures supply defaults on demand.

json() accepts PHP lists and associative arrays. An enum definition accepts instances of the declared backed enum and stores their backing values. A stored backing value that fails validation falls back to the default and reports SettingTypeMismatch.

Secret definitions use string()->secret() and have a null default. The package reads secrets from encrypted database values. Products that provide their own environment fallback handle it in application code.

License

MIT