Use variables in the confi file laravel code example
Example 1: laravel set config value dynamically
Config::set('custom.my_val', 'mysinglelue');
Example 2: laravel set config
config()->set('config.path', $value);
Config::set('custom.my_val', 'mysinglelue');
config()->set('config.path', $value);