src/Entities/Settings/SettingsCollection.php
public function getByKey(SettingKeyShort $key)
    {
        foreach ($this->all() as $setting) {
            if ($setting->getKey()->getId() == $key->getId() || $setting->getKey()->getName() == $key->getName()) {
                return $setting;
            }
        }

        return null;
    }
public function getByKey(SettingKeyShort $key)
    {
        foreach ($this->all() as $setting) {
            if ($setting->getKey()->getId() == $key->getId() || $setting->getKey()->getName() == $key->getName()) {
                return $setting;
            }
        }

        return null;
    }
@param SettingKeyShort $key The setting key

@return Setting|null