Answers for "twig if ternary"

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