It is possible to reference another Config variable within a configuration files?
Something like this config/app.php
'user' => Config::get('mail.user'),
A configuration file, often shortened to config file, defines the parameters, options, settings and preferences applied to operating systems (OSes), infrastructure devices and applications in an IT context. Software and hardware devices can be profoundly complex, supporting myriad options and parameters.
Config files are used to store key value pairs or some configurable information that could be read or accessed in the code and at some point, of time.
The configparser module has ConfigParser class. It is responsible for parsing a list of configuration files, and managing the parsed database. Return all the configuration section names. Return whether the given section exists.
To open a CFG file using the native Notepad app, open Windows File Explorer at the location of the file. If Windows automatically recognizes the CFG file, double-click it to open it in Notepad. Alternatively, right-click the CFG file and select the Open With option.
No, as far as I know this isn't possible in the way you suggested. As mentioned in the other questions you should do that by using you're environment file.
I suggest you do this in a service provider. To me it sounds like you're doing something what isn't actually not a configuration thing. I think you better can do it this way:
As you can see in the documentation of the configuration repository there is a set method on the config repository. So do it like this in a service provider:
public function boot()
{
Config::set('app.user',Config::get('mail.user'));
}
Put this in the boot method so every binding is present in the IoC container.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With