public function getSetting($name)
    {
        if ($this->hasName($name) === false) {
            throw NameDoesNotExist::named($name, $this->alias());
        }
        /** @var SettingRepository $repository */
        $repository = app(SettingRepository::class);
        $query = $repository->getNewQuery();
        $query = $this->makeQueryFiltered($query);
        $setting = $query->where('name', $name)->first();
        if (!$setting) {
            $defaultValue = $this->getDefault($name);
            $this->update($name, $defaultValue);
            $setting = $query->first();
        }
        return $setting;
    }