private function getDbConfig() {
        if (file_exists(MODULES_DIR . DS . $this->currentRoute['module'] . '/Config/database.php')) {
            $dbConfig = require_once MODULES_DIR . DS . $this->currentRoute['module'] . '/Config/database.php';

            if (!empty($dbConfig) && is_array($dbConfig)) {
                return $dbConfig;
            } else {
                throw new \Exception(ExceptionMessages::INCORRECT_CONFIG);
            }
        } else {
            if (file_exists(BASE_DIR . '/config/database.php')) {
                $dbConfig = require_once BASE_DIR . '/config/database.php';
                if (!empty($dbConfig) && is_array($dbConfig)) {
                    return $dbConfig;
                } else {
                    throw new \Exception(ExceptionMessages::INCORRECT_CONFIG);
                }
            } else {
                throw new \Exception(ExceptionMessages::DB_CONFIG_NOT_FOUND);
            }
        }
    }