diff --git a/src/Sites/Sites.php b/src/Sites/Sites.php index 40c6ac6665..717ed3ad7f 100644 --- a/src/Sites/Sites.php +++ b/src/Sites/Sites.php @@ -129,10 +129,10 @@ protected function getSavedSites() { return File::exists($sitesPath = $this->path()) ? YAML::file($sitesPath)->parse() - : $this->getDefaultSite(); + : $this->getFallbackConfig(); } - protected function getDefaultSite() + protected function getFallbackConfig() { return [ 'default' => [ @@ -149,6 +149,7 @@ public function save() $newSites = $this->getNewSites(); $deletedSites = $this->getDeletedSites(); + // Save sites to store $this->saveToStore(); // Dispatch our tracked `SiteCreated` and `SiteDeleted` events @@ -161,7 +162,6 @@ public function save() protected function saveToStore() { - // Save to file File::put($this->path(), YAML::dump($this->config())); }