atayahmet / laravel-nestable

Laravel 5 nested category/menu generator
MIT License
214 stars 52 forks source link

First ul attribute #41

Closed richiej053 closed 6 years ago

richiej053 commented 6 years ago

Is there a way to assign an attribute to the parent ul without assigning it to the subsequent children? I have tried ulAttr(['class' => 'someClass']) but that asigns the class to all the ul elements.

<ul class="someClass">
    <li><a href="">T-shirts
        <ul>
            <li><a href="red-t-shirt">Red T-shirt</a></li>
            <li><a href="black-t-shirts">Black T-shirts</a></li>
        </ul>
    </li>
    <li><a href="">Sweaters
        <ul>
            <li><a href="red-sweaters">Red Sweaters</a></li>
            <li><a href="blue-sweaters">Blue Sweaters</a></li>
        </ul>
    </li>
</ul>
atayahmet commented 6 years ago

Added: firstUlAttr()

Update the package.