protected function render($template, $data = array())
    {
        $view        = null;
        $data        = array_merge_recursive($this->all(), $data);
        $data['app'] = $this->app;
        $template    = $this->resolve($template);


        if (! $template) {
            return;
        }

        if (! $this->layout) {
            $view = $this->make($template, $data);
        } else {
            $view = $this->layout->nest('content', $template, $data);
        }

        return $view;
    }