protected function insertBaseTag($view)
    {
        if (is_null($this->baseUrl)) {
            return $view;
        }

        return str_replace('<head>', '<head><base href="'.$this->baseUrl.'">', $view);
    }