all(); if (! empty($settings)) { return setting($key, $default); } $company_id = $this->getCompanyId(); if (empty($company_id)) { return $default; } $value = Setting::companyId($company_id)->where('key', $key)->pluck('value')->first(); return $value ?: $default; } }