public static function locateTemplate($template, $additionalPaths = array())
    {
        $defaultPaths = array(
            get_stylesheet_directory() . '/views',
            get_stylesheet_directory(),
            get_template_directory() . '/views',
            get_template_directory()
        );

        $searchPaths = array_merge($defaultPaths, $additionalPaths);

        $searchPaths = apply_filters('Municipio/blade/view_paths', $searchPaths);

        if (isset($searchPaths) && is_array($searchPaths) && !empty($searchPaths)) {
            foreach ($searchPaths as $path) {
                $file = $path . '/' . str_replace('.blade.php', '', basename($template)) . '.blade.php';

                if (!file_exists($file)) {
                    continue;
                }

                return $file;
            }
        } else {
            error_log("Muncipio error: No template search paths defined in " . __DIR__ . __FILE__);
        }

        return false;
    }