Bird
0
0

Which of the following is the correct syntax to include a Blade sub-view named header?

easy📝 Syntax Q12 of 15
Laravel - Views and Blade Templates
Which of the following is the correct syntax to include a Blade sub-view named header?
A<code>@include('header')</code>
B<code>@include:header</code>
C<code>@include[header]</code>
D<code>@include{header}</code>
Step-by-Step Solution
Solution:
  1. Step 1: Recall Blade include syntax

    The correct syntax uses parentheses and quotes: @include('viewname').
  2. Step 2: Check each option format

    Only @include('header') uses the correct parentheses and quotes. Others use invalid symbols.
  3. Final Answer:

    @include('header') -> Option A
  4. Quick Check:

    Correct syntax uses parentheses and quotes [OK]
Quick Trick: Use parentheses and quotes with @include [OK]
Common Mistakes:
  • Using colons, brackets, or braces instead of parentheses
  • Omitting quotes around view name
  • Writing @include without parentheses

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Laravel Quizzes