Skip to main content
Laravel Output Prediction Medium +20 XP

Blade Directive

What does @auth output?

LaravelRead-only
@auth
  <a href='/dashboard'>Dashboard</a>
@endauth

What is the output?

Show answer and explanation

Answer: Shows link only to authenticated users

@auth/@endauth is a Blade directive that renders its contents only when the user is authenticated.

Hint: @auth checks if the user is logged in.

What this challenge tests

Output Prediction in Laravel: blade, auth.

Related challenges