<commit_before><?php
namespace Unisharp\Pagerender;

trait PageRenderTrait
{
    /*********************************
     *********    General    *********
     ********************************/

    public function render()
    {
        if (!empty($page->custom_view)) {
            return view($this->folder.'.'.$page->custom_view);
        } else {
            return view($this->folder.'.'.$this->default_view);
        }
    }

    public function subs()
    {
        return $this->hasMany(get_class(), 'parent_id', 'id');
    }

    public function hasSubs()
    {
        return $this->subs->count > 0;
    }
<commit_msg>fixed cannot render custom_view<commit_after><?php
namespace Unisharp\Pagerender;

trait PageRenderTrait
{
    /*********************************
     *********    General    *********
     ********************************/

    public function render()
    {
        if (!empty($this->custom_view)) {
            return view($this->folder.'.'.$this->custom_view);
        } else {
            return view($this->folder.'.'.$this->default_view);
        }
    }

    public function subs()
    {
        return $this->hasMany(get_class(), 'parent_id', 'id');
    }

    public function hasSubs()
    {
        return $this->subs->count > 0;
    }

{'fraction_non_alphanumeric': 0.2601880877742947, 'fraction_numerical': 0.001567398119122257, 'mean_word_length': 2.396276595744681, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3933350', 'n_tokens_mistral': 366, 'n_tokens_neox': 355, 'n_words': 62}