protected static function getAllBlades($pattern = null, $traversePostOrder = 0)
    {
        if (!$pattern) {
            $pattern = get_template_directory() . '/app/views/**/*.blade.php';
        }

        $patternParts = explode('/**/', $pattern);
        $dirs = glob(array_shift($patternParts) . '/*', GLOB_ONLYDIR | GLOB_NOSORT);
        $files = glob(str_replace('/**/', '/', $pattern));
        foreach ($dirs as $dir) {
            $subDirContent = self::getAllBlades($dir . '/**/' . implode('/**/', $patternParts), $traversePostOrder);
            if (!$traversePostOrder) {
                $files = array_merge($files, $subDirContent);
            } else {
                $files = array_merge($subDirContent, $files);
            }
        }
        return $files;
    }