public function renderViewInKeyIf(string $key, array $with = null): string
    {
        if (!$this->has($key)) {
            return '';
        }

        $view = $this->$key;

        if (static::exists($view)) {
            return $this->render($view, $with);
        } else {
            return '';
        }
    }