protected function parseString($string, $is_view = false)
    {
        if (is_object($this->model) && (strpos($string,'{{') !== false || strpos($string,'{!!') !== false || $is_view)) {
            $fields = $this->model->getAttributes();
            $relations = $this->model->getRelations();
            $array = array_merge($fields, $relations, ['model'=>$this->model]) ;
            $string = ($is_view) ? view($string, $array) : $this->parser->compileString($string, $array);
        }

        return $string;
    }
protected function parseString($string, $is_view = false)
    {
        if (is_object($this->model) && (strpos($string,'{{') !== false || strpos($string,'{!!') !== false || $is_view)) {
            $fields = $this->model->getAttributes();
            $relations = $this->model->getRelations();
            $array = array_merge($fields, $relations, ['model'=>$this->model]) ;
            $string = ($is_view) ? view($string, $array) : $this->parser->compileString($string, $array);
        }

        return $string;
    }
protected function parseString ( $ string , $ is_view = false ) { if ( is_object ( $ this -> model ) && ( strpos ( $ string , '{{' ) !== false || strpos ( $ string , '{!!' ) !== false || $ is_view ) ) { $ fields = $ this -> model -> getAttributes ( ) ; $ relations = $ this -> model -> getRelations ( ) ; $ array = array_merge ( $ fields , $ relations , [ 'model' => $ this -> model ] ) ; $ string = ( $ is_view ) ? view ( $ string , $ array ) : $ this -> parser -> compileString ( $ string , $ array ) ; } return $ string ; }
parse blade syntax string using current model
@param $string
@param bool $is_view
@return string
parse blade syntax string using current model