laravel/framework — pull request #4618 by Gufran (2014-06-08 12:56:50+00:00)
Title: Load environment variables in dot-flatten form

last one was proposed to 4.2 branch here https://github.com/laravel/framework/pull/4617

Right now `.env` files allows only single dimensional array of config variables, on adding a multidimensional array like this

```php
return array(
'database' => array(
'mysql' => array(
'host' => 'localhost',
'user' => 'user',
'password' => 'pass'
),
'pgsql' => array(
'host' => 'localhost',
'user' => 'user',
'password' => 'pass'
)
)
);
```
It throws error while trying to put keys and values in `$_ENV` and `$_SERVER` globals.
This patch converts array from `.env` file into a dot notation flatten array like this:

```php
array(
'database.mysql.host' => 'localhost',
'database.mysql.user' => 'user',
'database.mysql.password' => 'pass',
'database.pgsql.host' => 'localhost',
'database.pgsql.user' => 'user',
'database.pgsql.password' => 'pass',
)
```

and lets you access them via dot notations. `getenv('database.mysql.host')` and so on