jeudi 5 avril 2018

How to handle arrays in the configuration? (Laravel)

I created a new configuration file, which is a nested array with string keys. The .env can not store arrays, that is why I created the config/myconfig.php. I access the data with Config::get('myconfig')

Unfortunatelly this config is not the save for every customer. Since I can not put this array into the .env, I manually update the config php file, where it is needed.

What is the best way to define an environment variable, which is not a simple string, but a nested array?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire