I always commit all of my configuration files to my repository. Rather than storing sensitive information such as the database connection info in the config files, I use environment variables to store that information. My config/database.php ends up looking like this:
'mysql' => array(
'driver' => 'mysql',
'host' => 'localhost',
'database' => getenv('DB_NAME'),
'username' => getenv('DB_USER'),
'password' => getenv('DB_PASS'),
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
),
Hi pbrzoski,
But you can setup this easily in 4.2:
Create .env.local.php on main directory with this content:
<? php
return [
'DB_HOST' => 'localhost',
'DB_UNSERNAME' => 'your_username',
'DB_PASSWORD' => 'your_password',
'DB_NAME' => 'your_dbname'
];
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community