I wanted to make my <li> tag active , for that i wanted to check if $category->id == $product->category_id if equals then the class would be active otherwise inactive. How do i do it inside blade? I have done the following way.But i couldn't get proper output.
<li class="{!! ($category->id == $product->category_id) ? 'active': '' !!}">
caregory_id=>category_id). Otherwise this should work.