When I try to use the "or" operator on the blade it renders the wrong and undefined variable. I'm calling it like this:
{{ $confirmed or false }}
But it's compiling like this:
<?php echo e($confirmed or false); ?>
When I try to use the "or" operator on the blade it renders the wrong and undefined variable. I'm calling it like this:
{{ $confirmed or false }}
But it's compiling like this:
<?php echo e($confirmed or false); ?>
The correct basic usage is:
{{ $confirmed or 'false' }}
In case you are trying to put false
as an element, not a string
or variável
.
Try this:
{{ isset($confirmed) ? 'valor se ok' : 'valor se nao existe'; }}
or use the form below to return the value of the variable itself:
{{ isset($confirmed) ? $confirmed : 'valor se nao existe'; }}