Some fixes to the installer

This commit is contained in:
Nabeel Shahzad
2017-12-14 21:34:11 -06:00
parent a7318b851b
commit 719d7c2bd5
10 changed files with 51 additions and 41 deletions

View File

@@ -17,7 +17,7 @@ class DatabaseService {
Log::info('Testing Connection: '.$type.'::'.$user.':'.$pass.'@'.$host.':'.$port.';'.$name);
if($type === 'mysql') {
$dsn = "mysql:host=$host;port=$port;dbname=$name";
$dsn = "mysql:host=$host;port=$port;";
Log::info('Connection string: '. $dsn);
try {
$conn = new PDO($dsn, $user, $pass);

View File

@@ -14,6 +14,7 @@ class EnvironmentService
public function createEnvFile($type, $host, $port, $name, $user, $pass)
{
$opts = [
'APP_ENV' => 'dev',
'APP_KEY' => $this->createAppKey(),
'DB_CONN' => $type,
'DB_HOST' => $host,
@@ -50,7 +51,7 @@ class EnvironmentService
if(\extension_loaded('apc')) {
$opts['CACHE_DRIVER'] = 'apc';
} else {
$opts['CACHE_DRIVER'] = 'filesystem';
$opts['CACHE_DRIVER'] = 'file';
}
return $opts;
@@ -81,8 +82,7 @@ class EnvironmentService
*/
protected function writeEnvFile($opts)
{
$app = app();
$env_file = $app->environmentFilePath();
$env_file = \App::environmentFilePath();
$env_file .= config('installer.env_postfix');
# render it within Blade and log the contents