Olete.in
Articles
Mock Tests
đź§Ş Laravel MCQ Quiz Hub
Laravel MCQ (Multiple Choice Question) Set 2
Choose a topic to test your knowledge and improve your Laravel skills
1. Bootstrap directory in Laravel is used to__________
Initialize a Laraval application
Call laravel library functions
Load laravel classes and models
Load the configuration files
2. Interpolation of variable in laravel done using
{{}}
compact
helpers
None
3. Which command is used to start laravel server?
php artisan project_name
artisan start-server
php artisan serve
php artisan start php
4. Which one Laravel command line interface?
Composer
Php artisan
Git
CLI
5. Why does Laravel use the Blade Template Engine?
As a template
To simplify programming
For the view in MVC
For fun
6. View files in Laravel end in________–
.blade.php
.vue
.blade
.php
7. Which of the following function in Laravel checks that the desired table is exists in the database or not?
hashTable()
hasTab()
hasTable()
None
8. What is Laravel?
Programming language
PHP framework
Code generator
None of These
9. Where do we need to set database connection in Laravel?
Config.php
Setting.php
In seed files
.ENV file
10. Where is the routing file located in Laravel ?
urls/
routes/
vendors/
app/Http/
11. How to check current laravel version install your system?
php artisan check –version
php artisan make –version
php artisan –version
none of the above
12. How to get current action name in Laravel?
request()->DB->getActionMethod()
request()->route()->getActionMethod()
request()->getActionMethod()
None of These
13. Which command is used to create migrations in Laravel?
php artisan make:migration create_users_table
php artisan migration create_users_table
php artisan make:migrate create_users_table
None of These
14. What does ORM stands for in laravel?
object-related Modifier
overloaded-relational Mapping
object-Rotational Mechanisim
object-relational Mapping
15. Composer is a tool for ______ in PHP.
Configuration
Dependency management
Interpolation
None of These
16. Which class is used in Laravel to handle exceptions?
AppExceptionHandler
AppExceptionsHandler
AppExceptionsHandle
None of these
17. When was Laravel first released?
June 2011
June 2007
June 2009
None of These
18. After running “artisan down”, The project will show the maintenance page. What would be HTTP Status return Code?
298
503
400
254
19. Where are all the Laravel Models stored at ?
Inside Laravel database
Within a server
Main app directory
None of the above
20. Which of the following methods are used in Database Migrations classes?
run() and delete()
save() and update()
execute() and rollback()
up() and down()
21. What is the purpose of Laravel Blade Template Engine?
Make things harder
Increase workload for students
Beautify Laravel
Makes writing syntax easy and readable
22. What is the purpose of learning Web Programming?
To install computer programs
To create computer parts
To design the computer outlook
To talk to computers
23. The vendor directory contains
Assets
Laravel Framework code
Third-party code
Configuration files
24. What type of way does Laravel use to get data from a database ?
Eloquent ORM and Query Builder
Eloquent ORM
Query Builder
None of the above
25. Which one of the following command is used to create middleware in Laravel?
php artisan make: middleware
php arti make: middleware
php artisan: middleware
None of the above
26. What is Node JS?
Different version of the normal JavaScript
Special type of JavaScript language
JavaScript runtime environment that executes JavaScript code
None of These
Submit