title: How to write logic inside HTML tag in laravel Blade
body: <p>I wanted to make my <code>&lt;li&gt;</code> tag active , for that i wanted to check if <code>$category-&gt;id == $product-&gt;category_id</code> 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.</p>
  
  <pre><code>&lt;li  class="{!! ($category-&gt;id == $product-&gt;category_id) ? 'active': '' !!}"&gt;
  </code></pre>