*/ class SettingRepository extends Repository { /** @return array */ public function getAllAsKeyValueArray(): array { return $this->modelClass::query()->pluck('value', 'key')->toArray(); } public function getByKey(string $key): mixed { return Setting::get($key); } }