Support the ongoing development of Laravel.io →
posted 10 years ago
Blade
Last updated 2 years ago.
0

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.

Last updated 2 years ago.
0

machuga said:

{{ $bla ? "(complete)" || "({$missing} missing)" }}

This outputs error: syntax error, unexpected ';'

<?php echo $bla ? "(complete)" || "({$missing} missing)"; ?>
Last updated 2 years ago.
0

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)" }}
Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Sharping sharping Joined 28 Jun 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.