Answers for "ternary in twig"

PHP
1

twig if ternary check

{{ foo ?: 'no' }} is the same as {{ foo ? foo : 'no' }}
{{ foo ? 'yes' }} is the same as {{ foo ? 'yes' : '' }}
Posted by: Guest on June-03-2021

Browse Popular Code Answers by Language