akaunting / laravel-setting

Persistent settings package for Laravel

Home Page:https://akaunting.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Override not present on database does not fall back to original config

delmicio opened this issue · comments

Hi, I've added an override setting, but when that setting is null (meaning does not exist on DB) it does not fall back to the config value.

// config/setting.php
return [
    'override' => [
        // from table setting to app config
        'out.timezone' => 'out.timezone',
    ],
]

// config/out.php
return [
    'timezone' => 'America/New_York'
]

// setting does not exist on database
echo config('out.timezone'); // returs null -> should be 'America/New_York'

Setting::set('out.timezone', 'UTC');
Setting::save();

echo config('out.timezone'); // returs 'UTC' -> OK