jeudi 2 novembre 2017

Laravel blade concatenate string if variable is not empty

I'm trying to add an id attribute to a link if a given variable is not empty. To do so I'm using the inline-if sentence.

<li><a   != "" ? id= : '' href=""></a></li>

Output: enter image description here

Aucun commentaire:

Enregistrer un commentaire