toneee
2400
8
General

Blade if else on single line

Posted 2 years ago by toneee

Hi,

I am trying to get an if else statement on a single line in a blade. is this possible? So to compress the below on to a single line.

@if ($var === "hello")
    Hi
@else
    goodbye
@endif

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.