Laravel MCQ Question and Answer
Categories: MCQS
Laravel MCQ Question and Answer
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
Answer: A
2. How to create a controller in laravel by cmd?
- php artisan make:controller generate
- php artisan make: generate controller contoller_name
- php artisan make:controller –plain
- php artisan make:request controller_name create
Answer: C
3. Which of the following is true about Laravel?
- Laravel is an open-source PHP framework
- Laravel is robust
- Laravel is easy to understand
- All of the above
Answer: D
4. Command line interface used in Laravel is called?
- composer
- Artisan
- Symphony
- ORM
Answer: B
5. Which artisan command is used to remove the compiled class file.
- clear-compiled
- clear compiled
- compiled:clear
- clear:all
Answer: D
6. Laravel uses to connect to an existing session and general-purpose cache
- Queues
- Cron
- Redis
- Command Bus
Answer: C
7. Which command is used to create Middleware?
- php make:middleware <middleware-name>
- php artisan middleware <middleware-name>
- php middleware <middleware-name>
- php artisan make:middleware <middleware-name>
Answer: D
8. The vendor directory contains
- Laravel Framework code
- Assets
- Third-party code
- Configuration files
Answer: C
9. Where is the routing file located in Laravel?
- app/Http/
- routes/
- urls/
- vendors/
Answer: B
10. View files in Laravel end in
- .blade.php
- .php
- .vue
- .blade
Answer: A