Laravel MCQ Quiz & Test

Take Laravel Quiz To test your Knowledge 

Below are few Laravel MCQ test that checks your basic knowledge of Laravel Framework. This Laravel Test contains around 15 questions of multiple choice type with 4 options. You have to select the right answer to a question. You can see the correct answer by clicking view answer link.

Also, Read Best Laravel interview questions.

1. Which method returns the average value of a given key ?

  • average()
  • avg()
  • median()
  • avg_val()
View Answer

2. Bootstrap directory in Laravel is used to

  • Initialize a Laraval application
  • Call laravel library functions
  • Load the configuration files
  • Load laravel classes and models
View Answer

3. Which artisan command is used to remove the compiled class file.

  • clear-compiled
  • clear compiled
  • compiled:clear
  • clear:all
View Answer

4. Which method breaks the collection into multiple, smaller collections of a given size

  • split()
  • chunk()
  • explode()
  • break()
View Answer

5. Artisan command to flush the application cache:

  • cache:flush
  • cache:clear
  • cache:forget
  • cache:remove
View Answer

6. The vendor directory contains

  • Laravel Framework code
  • Assets
  • Third-party code
  • Configuration files
View Answer

7. Where is the routing file located in Laravel ?

  • app/Http/
  • routes/
  • urls/
  • vendors/
View Answer

8. View files in Laravel end in

  • .blade.php
  • .php
  • .vue
  • .blade
View Answer

9. Which of following command is used to create a symbolic link from "public/storage" directory to "storage/app/public".

  • storage:link
  • link:public
  • link:storage
  • storage:link public/storage
View Answer

10. Which of following methods are used in database migrations classes?

  • execute() and rollback()
  • up() and down()
  • run() and delete()
  • save() and update()
View Answer

11. For what do the .env is used?

  • For setting environment variables
  • For running cron jobs
  • For tracking vendors
View Answer

12. Which directory contain “robot.txt” file ?

  • app
  • public
  • config
  • storage

13. Interpolation of variable in laravel done using

  • compact
  • {{}}
  • helpers

14. What is the HTTP Status Code for your website. When it is down for maintenance.

  • 501
  • 200
  • 400
  • 503
View Answer

15. __() in laravel used for

  • Printing value
  • For string translation
View Answer

Write For Us.

Contribute the Community.