protected function createEnvLocalFile($env_file, $env_local_file, $dbHost, $dbName)
    {
        if (!file_exists($env_file)) {
            $this->myCommand->error('Cannot find ".env" file to import the existing options.');
            return;
        }

        if (file_exists($env_local_file)) {
            $overwrite = $this->myCommand->confirm(
                'Overwrite the existing ".env.local" file?', false
            );

            if (! $overwrite) {
                return;
            }
        }

        $env = new EnvHelper;
        $env->read($env_file);

        $env['APP_ENV']   = 'local';
        $env['APP_DEBUG'] = 'true';

        $env['CACHE_DRIVER']   = 'file';
        $env['SESSION_DRIVER'] = 'file';

        if ((! is_null($dbHost)) && (! is_null($dbName))) {
            $env['DB_CONNECTION'] = 'cloudsql';
            $env['DB_SOCKET']     = '';
            $env['DB_HOST']       = $dbHost;
            $env['DB_DATABASE']   = $dbName;
            $env['DB_USERNAME']   = 'root';
            $env['DB_PASSWORD']   = 'password';
        }

        $this->addOptimizerOptions($env);

        $env->write($env_local_file);

        $this->myCommand->info('Created the ".env.local" file.');
    }