src/Seeds/SettingsTableSeeder.php
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,
                ]);
            }
        }
    }
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,
                ]);
            }
        }
    }
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 , ] ) ; } } }
Seed the Plans table.
Seed the Plans table .