Skip to content

SystemSettings ​

Facade: Unusualify\Modularous\Facades\SystemSettings
Accessor: system.settings
Underlying: Modules\SystemSetting\Services\SystemSettingsService
Model: Modules\SystemSetting\Entities\General (IsSingular)

Backend / system source of truth for global settings. Full usage guide: Settings Services.

Sections ​

site, social, contact, seo, smtp, analytics, locale, down_presets

Methods ​

Shared singular API — see Shared API.

MethodSignatureDescription
get / value(string $key, mixed $default = null, ?string $locale = null): mixedDot-path read with locale / media-leaf expansion
first(string $key, mixed $default = null, ?string $locale = null): mixedFirst list element when applicable
all(?string $locale = null): arrayLocale-resolved section tree
has(string $key): boolKey exists in snapshot
filled(string $key, ?string $locale = null): boolResolved value is non-empty
set(string $key, mixed $value): voidPersist + forget cache
forgetCache(): voidClear cached snapshot
snapshot(): arrayRaw cached sections

Usage ​

php
use Unusualify\Modularous\Facades\SystemSettings;

$host = SystemSettings::get('smtp.host');
SystemSettings::set('locale.timezone', 'Europe/Amsterdam');

$favicon = SystemSettings::value('site.favicon.original');
blade
<link rel="icon" href="{{ SystemSettings::value('site.favicon.original') }}">

Notes ​

  • Prefer SystemSettings (or SiteSettings::forBackend()) for SMTP, analytics, and locale — those sections are not on SiteSetting.
  • Optional mail override: ApplySmtpMailConfig via MODULAROUS_SYSTEM_SETTINGS_MAIL_OVERRIDE.
  • Cache key: system_settings.snapshot (modularous.system_settings.cache_ttl).