laravel/framework — pull request #4617 by Gufran (2014-06-08 12:39:15+00:00)
Title: Load environment variables in dot-flatten form so that multidimensional arrays can be added to .env files

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