src/Database/Migration.php
public static function addSettings(array $defaults)
    {
        return [
            'up' => function (Builder $schema) use ($defaults) {
                $settings = new DatabaseSettingsRepository(
                    $schema->getConnection()
                );

                foreach ($defaults as $key => $value) {
                    $settings->set($key, $value);
                }
            },
            'down' => function (Builder $schema) use ($defaults) {
                $settings = new DatabaseSettingsRepository(
                    $schema->getConnection()
                );

                foreach (array_keys($defaults) as $key) {
                    $settings->delete($key);
                }
            }
        ];
    }
public static function addSettings(array $defaults)
    {
        return [
            'up' => function (Builder $schema) use ($defaults) {
                $settings = new DatabaseSettingsRepository(
                    $schema->getConnection()
                );

                foreach ($defaults as $key => $value) {
                    $settings->set($key, $value);
                }
            },
            'down' => function (Builder $schema) use ($defaults) {
                $settings = new DatabaseSettingsRepository(
                    $schema->getConnection()
                );

                foreach (array_keys($defaults) as $key) {
                    $settings->delete($key);
                }
            }
        ];
    }
public static function addSettings ( array $ defaults ) { return [ 'up' => function ( Builder $ schema ) use ( $ defaults ) { $ settings = new DatabaseSettingsRepository ( $ schema -> getConnection ( ) ) ; foreach ( $ defaults as $ key => $ value ) { $ settings -> set ( $ key , $ value ) ; } } , 'down' => function ( Builder $ schema ) use ( $ defaults ) { $ settings = new DatabaseSettingsRepository ( $ schema -> getConnection ( ) ) ; foreach ( array_keys ( $ defaults ) as $ key ) { $ settings -> delete ( $ key ) ; } } ] ; }
Add default values for config values.
Add default values for config values .