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

Inline if statements...

{{ 1===1 ? 'say 1' : 'say 2' }}

https://stackoverflow.com/questions/25284344/ternary-in-larave...

0

Blade statements require a newline after to work:

­@if(1==1)
say 1
@else
say 2
@endif
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Burak Burak burakkaraoglu Joined 24 Jul 2017

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.