/** * Seed the Plans table */ public function run() { $defaults = []; $defaults = $this->cleanupAndMerge($this->getDefaults(), $this->config); foreach ($defaults as $slug => $column) { $setting = Setting::bySlug($slug); if ($setting->count()) { $setting->first()->update(['default' => $column]); } else { Setting::create(['lang' => null, 'slug' => $slug, 'value' => $column, 'default' => $column]); } } }