0
According to Laravel’s documentation
{{{ $name or 'Default' }}}
should behave as
if(isset($name))
echo $name
else
echo 'Default'
or
echo isset($title) ? $title : 'Default'
But it’s coming back 1
as if it were a true
.
Now I’m using {{ isset($title) ? $title : 'Default' }}
and it’s working, but I’d like to understand what happens in the first version, does anyone know why I get 1
?
Hello @Vitor. Put your question in English, you are on Sopt. Thank you.
– João Martins
In the first example you use the variable
$nome
and in the second variable$title
.– Roberto de Campos