src/Koldy/Response/View.php
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 '';
        }
    }
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 '';
        }
    }
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 '' ; } }
Render view from key variable if exists - if it doesn't exists, it won't throw any error

@param string $key
@param array $with

@return string
@throws Exception
Render view from key variable if exists - if it doesn t exists it won t throw any error