public function getCompiler()
    {
        if (!$this->compiler) {
            $cachePath = $this->config->get('cache_path') ?: GlobalContainer::getCachePath();

            if (!$cachePath) {
                throw new \InvalidArgumentException('Please set cache_path into config.');
            }

            if (!is_dir($cachePath)) {
                mkdir($cachePath, 0755, true);
            }

            $this->compiler = new CompilerEngine(new BladeCompiler($this->getFilesystem(), $cachePath));
        }

        return $this->compiler;
    }