AdonisJS v6 is here. Learn more in our release blog post.


You can write conditionals using the @if, @elseif and the @else tags. All three tags works similar to the JavaScript if/else statements.

<p> {{ user.username }} </p>
<p> Hello {{ user.fullName }}! </p>
<p> Hello {{ user.firstName }}! </p>
<p> Hello Guest! </p>

The inverse of the @if tag is the @unless tag. You might find it expressive to write the NOT IF statements.

<p> Please verify the email address to activate your account </p>