private function configureDatabase ()
    {
        $this->comment ("Database configuration:");

        $db['host']     = $this->choice ("Database hostname: ", ['localhost', 'custom'], 0);
        $db['name']     = $this->ask ("Database name: ");
        $db['username'] = $this->ask ("Database username: ");
        $db['password'] = $this->secret ("Database password: ");

        if (!$this->_connected ($db)) {
            $this->info ('');
            $this->error ('Not connected to database');
            $this->info ('');

            return $this->configureDatabase ();
        }

        $this->envData['DB_HOST']     = $db['host'];
        $this->envData['DB_DATABASE'] = $db['name'];
        $this->envData['DB_USERNAME'] = $db['username'];
        $this->envData['DB_PASSWORD'] = $db['password'] . "\n";

        $this->info ('');
        $this->comment ('Database configured successfully!');
        $this->info ('');
    }