private function categoriesHTML($category = null)
    {
        $categories = $this->eloqentCategory()->all();
        $total = $this->eloqent()->active()->count();

        $categoryId = 0;
        if ($category) {
            $categoryId = $category->id;
        }

        // get the relationship name - same as view
        $relationship = $this->view;
        $title = 'All <span>(' . $total . ')</span>';
        $html = '<li><a href="' . $this->URLPrefix . '" class="' . ($categoryId == 0 ? 'active' : '') . '">' . $title . '</a></li>';
        foreach ($categories as $k => $category) {

            // get total items for relationship / category
            $total = $category->{$relationship}()->count();

            if ($total > 0) {
                $active = $category->id == $categoryId ? 'active' : '';
                $title = $category->title . ' <span>(' . $total . ')</span>';
                $html .= '<li><a href="' . $this->URLPrefix . $category->url . '" class="' . $active . '">' . $title . ' </a></li>';
            }
        }

        return $html;
    }
private function categoriesHTML($category = null)
    {
        $categories = $this->eloqentCategory()->all();
        $total = $this->eloqent()->active()->count();

        $categoryId = 0;
        if ($category) {
            $categoryId = $category->id;
        }

        // get the relationship name - same as view
        $relationship = $this->view;
        $title = 'All <span>(' . $total . ')</span>';
        $html = '<li><a href="' . $this->URLPrefix . '" class="' . ($categoryId == 0 ? 'active' : '') . '">' . $title . '</a></li>';
        foreach ($categories as $k => $category) {

            // get total items for relationship / category
            $total = $category->{$relationship}()->count();

            if ($total > 0) {
                $active = $category->id == $categoryId ? 'active' : '';
                $title = $category->title . ' <span>(' . $total . ')</span>';
                $html .= '<li><a href="' . $this->URLPrefix . $category->url . '" class="' . $active . '">' . $title . ' </a></li>';
            }
        }

        return $html;
    }
private function categoriesHTML ( $ category = null ) { $ categories = $ this -> eloqentCategory ( ) -> all ( ) ; $ total = $ this -> eloqent ( ) -> active ( ) -> count ( ) ; $ categoryId = 0 ; if ( $ category ) { $ categoryId = $ category -> id ; } // get the relationship name - same as view $ relationship = $ this -> view ; $ title = 'All <span>(' . $ total . ')</span>' ; $ html = '<li><a href="' . $ this -> URLPrefix . '" class="' . ( $ categoryId == 0 ? 'active' : '' ) . '">' . $ title . '</a></li>' ; foreach ( $ categories as $ k => $ category ) { // get total items for relationship / category $ total = $ category -> { $ relationship } ( ) -> count ( ) ; if ( $ total > 0 ) { $ active = $ category -> id == $ categoryId ? 'active' : '' ; $ title = $ category -> title . ' <span>(' . $ total . ')</span>' ; $ html .= '<li><a href="' . $ this -> URLPrefix . $ category -> url . '" class="' . $ active . '">' . $ title . ' </a></li>' ; } } return $ html ; }
Get the categories HTML

@param null $category
@return string
Get the categories HTML