Bird
0
0

Which of the following is the correct way to include a Blade sub-view named footer in your template?

easy📝 Syntax Q3 of 15
Laravel - Views and Blade Templates
Which of the following is the correct way to include a Blade sub-view named footer in your template?
A@include->footer()
B@include:footer
C@include[footer]
D@include('footer')
Step-by-Step Solution
Solution:
  1. Step 1: Recall Blade syntax

    The correct syntax for including a sub-view is @include('viewname').
  2. Step 2: Check options

    Only @include('footer') uses the correct parentheses and quotes syntax.
  3. Final Answer:

    @include('footer') -> Option D
  4. Quick Check:

    Use parentheses and quotes with @include [OK]
Quick Trick: Always use parentheses and quotes with @include [OK]
Common Mistakes:
  • Using colons or brackets instead of parentheses
  • Omitting quotes around view name
  • Using arrow syntax which is invalid

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Laravel Quizzes