lundi 26 décembre 2016

How to set active class?

I get link something like this : http://ift.tt/2iasbO2

 @foreach($categories as $category)
         <li><a href="/blog/articles//"> ()</a></li>
    @endforeach

What i want is to set active class on li for category that im on. Any suggestion? Maybe i need to compare id from url and this in foreach. But how?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire