Blade expects them all to be on individual lines. Consider using the {{ $blah ? "(complete)" || "({$missing} missing)" }}
syntax if you'd like it on one line. Another alternative is placing this into a presenter object.
machuga said:
{{ $bla ? "(complete)" || "({$missing} missing)" }}
This outputs error: syntax error, unexpected ';'
<?php echo $bla ? "(complete)" || "({$missing} missing)"; ?>
Sharping said:
machuga said:
{{ $bla ? "(complete)" || "({$missing} missing)" }}
This outputs error: syntax error, unexpected ';'
<?php echo $bla ? "(complete)" || "({$missing} missing)"; ?>
Try this instead:
{{ ($bla) ? '(complete)' : "($missing missing)" }}
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community