protected function getPathFromConfig($configName, $default)
    {
        $path = config("laravel-package-generator.$configName");

        if (empty($path)) {
            $path = $default;
        } else {
            $path = base_path($path);
        }

        $realPath = realpath($path);

        if ($realPath === false) {
            throw RuntimeException::noAccessTo($path);
        }

        return $realPath;
    }