Olete.in
Articles
Mock Tests
🧪 Yii PHP web application framework MCQ Quiz Hub
PHP Laravel MCQ
Choose a topic to test your knowledge and improve your Yii PHP web application framework skills
1. 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
2. ORM (Object Relational Mapper) and ActiveRecord implementation called?
Eloquent
Query Builder
Schema Builder
Blade Template
3. ____________ acts as a bridge between a request and a response.
Routing
Middleware
Namespaces
Request
4. How many types of Middleware in Laravel?
2
3
4
6
5. _____________ can be defined as a class of elements in which each element has a unique name to that associated class.
Routing
Cookie
Namespaces
Request
6. In the MVC framework, the letter 'C' stands for?
Cookie
Configuration
command prompt
Controller
7. Cookie can be created by global cookie helper of Laravel.
TRUE
FALSE
Can be true or false
Can not say
8. How many arguments cookie() method will take?
2
4
1
3
9. Which method will automatically convert the array into appropriate json response?
application.json
json
routes
test
10. Which version introduces the concept of using Blade?
Laravel 2.1
Laravel 3.1
Laravel 4.1
Laravel 5.1
11. Command line interface used in Laravel is called?
composer
Artisan
Symphony
ORM
12. Laravel uses ___________ to connect to an existing session and general-purpose cache
Queues
Cron
Redis
Command Bus
13. 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>
14. The _______________ will run on every HTTP request of the application
Global Middleware
Route Middleware
Both A and B
None of the above
15. Which keyword allows the developers to shorten the namespace?
extend
use
artisan
class
16. Execute the below command to create a new controller called? php artisan make:controller UriController –plain
UrlController
pathController
UriController
routeController
17. The cookie can be attached to the response using the ?
isCookie() method
withCookie() method
getCookie() method
putCookie() method
18. By default, all cookies generated by Laravel are encrypted and signed so that they can not be modified or read by the client.
True
False
Can be true or false
Can not say
19. In MVC framework, the letter "V" stands for Value.
True
False
Can be true or false
Can not say
20. Laravel uses the Blade @extends directive for defining the child elements
TRUE
FALSE
Can be true or false
Can not say
Submit