Professional Documents
Culture Documents
MCQ 02 Laravel
MCQ 02 Laravel
A. PHP
B. JavaScript
C. Python
D. React
Answer: A) PHP
Explanation:
A. Yes
B. No
Answer: A) Yes
Explanation:
A. Yes
B. No
Answer: A) Yes
Explanation:
A. No
B. Yes
Answer: B) Yes
Explanation:
A. Yes
B. Taylor Otwell
C. Tim Berners-Lee
D. Guillermo Rauch
E. Brendan Eich
Explanation:
A. Frontend
B. Backend
Answer: B) Backend
Explanation:
A. Yes
B. No
Answer: A) Yes
Explanation:
8. All dependencies are specified in the ____ file, which is located in the
source folder?
A. Root
B. Config
C. composer.json
Answer: C) composer.json
Explanation:
All dependencies are specified in the composer.json file, which is located in the
source folder.
A. Command Prompt
B. CLI
C. Composer
D. Artisan
Answer: D) Artisan
Explanation:
Command line interface used in Laravel is called Artisan.
A. 30
B. 20
C. 100
D. 50
Answer: B) 20
Explanation:
A. Artisan
B. Composer
C. Hibernate
D. Eloquent
Answer: D) Eloquent
Explanation:
Eloquent is an object relational mapper (ORM) that comes with the Laravel
framework by default.
12. The database definitions and structure are kept in PHP code using ____.
A. Redis
B. Template engine
C. Schema Builder
The database definitions and structure are kept in PHP code using Schema
Builder.
A. Blade
B. Cron
C. Template engine
D. Command Bus
Answer: A) Blade
Explanation:
A. Browser
B. Composer
C. Eloquent
D. None of the above
Answer: B) Composer
Explanation:
15. Which folder in Laravel includes the entire source code of the project?
A. Events
B. Public
C. App
D. Console
Answer: C) App
Explanation:
A. Events
B. Public
C. Jobs
D. Console
Answer: D) Console
Explanation:
17. What is the extension of the folder which includes all the events for the
project?
A. .php
B. .txt
C. .xml
D. .laravel
Answer: A) .php
Explanation:
.php is the extension of the folder which includes all the events for the project.
18. What is the name of the file which handles all the exceptions?
A. Exception_methods.php
B. Handle.php
C. Exceptions.php
Answer: B) Handle.php
Explanation:
handle.php is the name of the file which handles all the exceptions.
19. Which folder in Laravel contains model, controllers and views defined
for the specific directories?
A. Events
B. Public
C. Jobs
D. Http
Answer: D) Http
Explanation:
Http folder in Laravel contains model, controllers and views defined for the
specific directories.
20. The ____ directory stores the actions that have been queued for the
Laravel application?
A. Events
B. Public
C. Jobs
D. Http
Answer: C) Jobs
Explanation:
The Jobs directory stores the actions that have been queued for the Laravel
application.
21. ____ are PHP classes that contain the authorization logic.
A. Policies
B. Providers
C. Http
Answer: A) Policies
Explanation:
A. 2
B. 3
C. 4
D. 5
Answer: B) 3
Explanation:
A. Seeds
B. Migrations
C. Factories.
Answer: A) Seeds
Explanation:
Seeds folder includes the classes needed for database unit testing.
A. Seeds
B. Migrations
C. Factories.
Answer: C) Factories.
Explanation:
25. Which of the following folder is the root folder and helps in initializing
the Laravel application?
A. Events
B. Public
C. Resources
D. Http
Answer: B) Public
Explanation:
Public folder is the root folder and helps in initializing the Laravel application.
26. The name standard for test case classes is ____, and it is based on the
functionality of the class?
A. Toggle case
B. Uppercase
C. Lowercase
D. Camel case
Explanation:
The name standard for test case classes is camel case, and it is based on the
functionality of the class.
A. Events
B. Public
C. Vendor
D. Resources
Answer: C) Vendor
Explanation:
28. ____are those that offer your web application with a list of web services.
A. Events
B. Environment variables
C. Routing
D. Resources
Explanation:
Environment variables are those that offer your web application with a list of web
services.
A. .environment
B. .env_varibales
C. .env
Answer: C) .env
Explanation:
30. The configuration settings are cached using which of the following
command?
A. Config_cache
B. Cache
C. Config
D. Config:cache
Answer: D) Config:cache
Explanation:
Answer: B) Routes
Explanation:
A. Data binding
B. Routes
C. Middleware
Answer: C) Middleware
Explanation:
A. 5
B. 4
C. 3
D. 2
Answer: D) 2
Explanation:
34. Every HTTP request made by the application will trigger the ____
Middleware.
A. Global
B. Route
Answer: A) Global
Explanation:
Every HTTP request made by the application will trigger the Global Middleware.
A. Global
B. Route
Answer: B) Route
Explanation:
A. $global
B. $route
C. $middleware
D. $routemiddleware
Answer: C) $middleware
Explanation:
A. $global
B. $route
C. $middleware
D. $routemiddleware
Answer: D) $routemiddleware
Explanation:
38. The terminate method in the middleware takes how many arguments?
A. 2
B. 4
C. 5
D. 6
Answer: A) 2
Explanation:
The terminate method will receive two arguments $request and $response.
Answer: C) Use
Explanation:
A. Objects
B. Data binding
C. Route
D. Controller
Answer: D) Controller
Explanation:
41. ____Controllers allow you to design a single route to handle all of the
controller's actions?
A. Implicit controller
B. Restful resource controller
C. Resource controller
Explanation:
Implicit Controllers allow you to design a single route to handle all of the
controller's actions.
A. Is
B. Use
C. Path
D. Link
Answer: C) Path
Explanation:
43. In how many ways you can retrieve the Input values in Laravel?
A. 1
B. 2
C. 3
D. 4
Answer: B) 2
Explanation:
Answer: A) 1
Explanation:
A. 1
B. 2
C. 3
D. 4
Answer: C) 3
Explanation:
A. Header()
B. Router()
C. Namespace()
D. Response()
Answer: A) Header()
Explanation:
47. Which of the following separates the application logic and the
presentation logic?
A. Model
B. View
C. Controller
Answer: B) View
Explanation:
A. 5
B. 6
C. 4
D. 7
Answer: C) 4
Explanation:
• MySQL
• Postgres
• SQLite
• SQL Server
49. Which of the following log channel driver in Laravel discards all log
messages?
A. Syslog
B. Slack
C. Single
D. Null
Answer: D) Null
Explanation:
A. Localization
B. Globalization
C. Language-app
Answer: A) Localization
Explanation:
51. ____ are used to store information about the user across the requests.
A. Localization
B. Memcached
C. Config
D. Sessions
Answer: D) Sessions
Explanation:
Sessions are used to store information about the user across the requests.
52. How many arguments does the Get() method takes in session?
A. 2
B. 1
C. 4
D. 5
Answer: B) 1
Explanation:
Get() method takes only one argument i.e., key to get the session data.
A. Get()
B. Post()
C. Put()
Answer: C) Put()
Explanation:
A. 2
B. 3
C. 4
D. 5
Answer: A) 2
Explanation:
55. Which of the following method is used to delete an item from the
session?
A. Delete (0
B. Expire()
C. Forget()
D. Del()
Answer: C) Forget()
Explanation:
A. Yes
B. No
Answer: B) NO
Explanation:
The forget() and pull() methods vary in that the forget() method does not return
the value of the session, but the pull() function returns it and deletes it from the
session.
57. Laravel uses free feature-rich library ____ to send emails?
A. SwiftMailer
B. Emailer
C. Mails
Answer: A) SwiftMailer
Explanation:
58. Which of the following artisan command creates all the listeners?
A. event:
B. event:listener
C. event:generate
Answer: C) event:generate
Explanation:
59. ____ provide a "static" interface to classes that are available in the
application service container?
A. Events
B. Facades
C. Views
Answer: B) Facades
Explanation:
Facades provide a "static" interface to classes that are available in the application
service container.
A. Yes
B. No
Answer: A) Yes
Explanation:
61. Laravel ____ are a set of interfaces that define the framework's basic
services?
A. Facades
B. Controller
C. Contracts
D. All of the above
Answer: C) Contracts
Explanation:
Laravel Contracts are a set of interfaces that define the framework's basic
services.
Explanation:
A. Yes
B. No
Answer: A) Yes
Explanation:
Laravel creates a CSRF "token" automatically for each active user session
controlled by the application.
A. Authorization
B. Identity management
C. Authentication
Answer: C) Authentication
Explanation:
A. php make:auth
B. php artisan make:auth
C. artisan make:auth
Explanation:
A. HomeController
B. CallController
C. DefaultController
Answer: A) HomeController
Explanation:
A. Authorization
B. Identity management
C. Authentication
Answer: A) Authorization
Explanation:
In authorization, the system or web application determines whether
authenticated users may access the resources they are attempting to access or
request.
A. Yes
B. No
Answer: B) NO
Explanation:
69. ____are basic closures that assess whether or not a user is permitted to
execute a particular operation?
A. Gates
B. Policies
Answer: A) Gates
Explanation:
Gates are basic closures that assess whether or not a user is permitted to execute
a particular operation.
A. Gates
B. Policies
Answer: B) Policies
Explanation:
A. Create:policy
B. Insert:Policy
C. Make:policy
D. Generate:policy
Answer: C) Make:policy
Explanation:
72. Which of the following command is used to get a list of all possible
Artisan commands?
A. Display
B. Show
C. View
D. List
Answer: D) List
Explanation:
You may use the list command to get a list of all possible Artisan commands.
73. ____ allows you to use the command line to interact with your whole
Laravel application, including Eloquent models, jobs, events, and more?
A. Tinker
B. Artisan
C. REPL
Answer: A) Tinker
Explanation:
Tinker allows you to use the command line to interact with your whole Laravel
application, including Eloquent models, jobs, events, and more.
74. ____ is the act of turning plain text to a message using techniques that
prevents any third party from reading the information?
A. Decryption
B. Encryption
Answer: B) Encryption
Explanation:
Encryption is the act of turning plain text to a message using techniques that
prevents any third party from reading the information.
A. AES-256
B. AES-128
C. Both
D. Only A
E. Only B
Answer: C) Both
Explanation:
A. Decryption
B. Encryption
C. Hashing
Answer: C) Hashing
Explanation:
The process of converting a string of characters into a shorter fixed value or key
that represents the original string is known as hashing.
77. Is Error 403 and Error 404 the same kind of errors?
A. Yes
B. No
Answer: B) NO
Explanation:
The difference between 403 and 404 errors is that 404 is displayed when a user
attempts to access an unknown resource or URL, whereas 403 error, as shown in
the screenshot above, is presented when an unauthorized user attempts to
access the website.
78. How many attributes does artisan command expectsQuestion includes?
A. 1
B. 3
C. 4
D. 2
Answer: D) 2
Explanation:
expectsQuestion includes two attributes.: One with question and other with an
apiKeySecret.
A. 1
B. 3
C. 4
D. 2
Answer: A) 1
Explanation:
A. Angular.
B. CodeIgniter.
C. CakePHP.
D. Phalcon.
E. All of the above
• Angular.
• CodeIgniter.
• CakePHP.
• Phalcon.
81. Which of the following is the oldest broadcasting organization who uses
Laravel?
A. Netflix
B. Facebook
C. BBC
D. IBM
Answer: C) BBC
Explanation:
BBC is the oldest broadcasting organization who uses Laravel, other companies
who uses Laravel are: 9GAG, Pfizer, TourRadar, and Crowdcube.