0% found this document useful (0 votes)
152 views

Laravel Framework For Web Apps With PHP-6740 (Updated 13-July-2021)

Acha he

Uploaded by

Ali Raza
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
152 views

Laravel Framework For Web Apps With PHP-6740 (Updated 13-July-2021)

Acha he

Uploaded by

Ali Raza
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Prepared By: Abrar Ahmed

PRIME Sem3 PHP Framework (Laravel) Module End Exam


Book name: Laravel Framework for Web Applications with PHP,
Q.1 Which of the following is the correct command to install Homestead?
A. vagrant box add laravel/homestead B. vagrant box add homestead/laravel
C. vagrant box install laravel/homestead D. vagrant box install homestead/laravel
Correct Answer: A
Reference: Page # 19, Heading 1.1.7

Q.2 Which of the following terms BEST describes Laravel?


A. Application B. Framework
C. Software D. Tool
Correct Answer: B
Reference: Page # 22

Q.3 The acronym for Hypertext Processor is _______________


A. HP B. PHP
C. HTTP D. HTML
Correct Answer: B
Reference: Page # 30, Heading 2.2

Q.4 A _________is a basic templating structure that is used to develop. test and deploy applications
rapidly and efficiently
A. Template Engine B. Web Engine
C. Framework D. Script
Correct Answer: C
Reference: Page # 30, Heading 2.2

Q.5 ____________ is a development model that includes rapid prototyping


A. Rapid Action Program B. Laravel Framework
C. Templating Rapid D. Application Development
Correct Answer: A
Reference: Page # 31, Heading 2.3

Q.6 Laravel uses the design pattern to facilitate development of Web applications in a
quick and easy manner
A. CakePHP B. Codelgniter
C. Model-View-Controller D. Web Application
Correct Answer: C
Reference: Page # 41, Heading 3.1

Q.7 Which of the following directories includes the Views that will be used to display the final Web

Page 1 of 7
page as well as the un-compiled assets related to JavaScript and CSS?
A. Bootstrap B. Resources
C. Storage D. Database
Correct Answer: B
Reference: Page # 35, Heading 2.4

Q.8 Which of the following enables the user to add elements to the project that follow the Laravel
convention?
A. Artisan Tool B. PHP Code
C. Laravel Components D. Composer
Correct Answer: A
Reference: Page # 46, Heading 3.4

Q.9 Although the Master Blade template uses the directive it is replaced by the content in the
directive of child templates
A. Expression and custom B. Namespace and functions
C. Yield and sections D. Array and list
Correct Answer: C
Reference: Page # 67, Heading 4.5.1

Q.10 The main reason to use the query builder over writing SQL code manually is because_________
A. It is rich in features B. It writes different SQL codes depending
on the database being used
C. It has few SQLite directives D. It uses configuration mode for migration
Correct Answer: B
Reference: Page # 83, Heading 5.4.2

Q.11 Functions that are defined in the model and that replace a long chain with a simple one are
called__________?
A. Model Events B. Event Listeners
C. Eloquent ORM D. Query Scopes
Correct Answer: D
Reference: Page # 92, Heading 5.5

Q.12 The method uses the URI, two arguments and the closure function that is executed in
response to the URI
A. put B. push
C. get D. set
Correct Answer: C
Reference: Page # 47, Heading 3.5

Q.13 ____________are required to use Composer and Homestead on Windows.


A. Virtual Environment B. PHP Binaries

Page 2 of 7
C. Windows tools D. SSH Keys
Correct Answer: B
Reference: Page # 10, Heading 1.1.2

Q.14 Which of the following commands will help to verify that Composer is installed on the
computer?
A. Gitbash B. ssh
C. cmd D. install
Correct Answer: C
Reference: Page #12 , Heading 1.1.3

Q.15 The GNU License information appears when you install___________ ?


A. Composer B. Vagrant
C. Homestead D. GitBash
Correct Answer: D
Reference: Page # 16, Heading 1.1.6

Q.16 The _______ file in windows is the first file that is referenced when the operating system tries
to resolve a domain name.
A. hosts B. local
C. public D. yaml
Correct Answer: A
Reference: Page # 43, Heading 3.3.2

Q.17 __________ is an essential feature in laravel that enables all application requests to direct
towards its respective controller.
A. SSH B. Unit Testing
C. Routing D. Migration System
Correct Answer: C
Reference: Page # 47

Q.18 Laravel recommends the use of _________ when writing codes.


A. models B. views
C. scripts D. keys
Correct Answer: B
Reference: Page # 48

Q.19 The ______ feature in the MVC design pattern eliminates the need to create new files and
multiple pages for a single application.
A. Synchronizing B. Formatting
C. collating D. editing
Correct Answer: D
Reference: Page # 48, Heading 3.6

Q.20 Which of the following terms BEST describes the statement Codes can be independent or

Page 3 of 7
interchanged based on the requirement?
A. static B. modularity
C. irrevocable D. configuring
Correct Answer: B
Reference: Page # 50, Heading 3.7

Q.21 The _______ in Laravel helps in creating tables.


A. Schema builder class B. Rowa
C. Foreign keys D. columns
Correct Answer: A
Reference: Page # 62, Heading 4.4.2

Q.22 The _____ directly includes the code that collates all files spread throughout the directories
and run the application.
A. bootstrap B. app
C. config D. routes
Correct Answer: A
Reference: Page # 35

Q.23 The _____ tool is an automation tool that helps to create models, views and controllers pre-
filled with a template.
A. command B. artisan
C. PHP dependency D. framework
Correct Answer: B
Reference: Page # 32, Heading 2.3.3

Q.24 Migration can be implemented by editing the _______ file and running the ______ command.
A. hosts and PowerShell B. .env and migrations
C. .hrm and ssh D. php and transfer
Correct Answer: B
Reference: Page # 63, Heading 4.4.3

Q.25 The code ‘vagrant@homestead:~$ composer –V’ verifies:


A. homestead version B. SQLite version
C. Laravel version D. Composer version
Correct Answer: D
Reference: Page # 23

Q.26 A ______ is a case where the attributes of a model are blindly updated
A. Attribute B. Mass assignment
C. Static controller D. Mighty model
Correct Answer: B
Reference: Page # 81

Page 4 of 7
Q.27 Match the following components with their respective description
SI Left SI Correct Answer for
Right Column
NO Column NO Column A

A1 PHP B1 Used to generate SSH keys B1 B2 B3 B4 B5 B6

An automation tool for building


A2 Composer B2 and managing virtual machine B1 B2 B3 B4 B5 B6
environments

A virtual environment that


A3 VirtualBox B3 provides resources to efficiently B1 B2 B3 B4 B5 B6
code. Web applications in Laravel

A dependency management tool


A4 Vagrant B4 B1 B2 B3 B4 B5 B6
for PHP

Should be installed on the


A5 GitBash B5 Windows host operating system B1 B2 B3 B4 B5 B6
to use Composer

A free and opensource


A6 Homestead B6 hypervisor that allows running B1 B2 B3 B4 B5 B6
guest VMs.
Reference: Page # 9, Heading 1.1.1

Q.28 When creating a record, it is necessary to include the ________ keyword array to prevent any
malicious attempt
A. $fillable B. $rows
C. @columns D. $fields
Correct Answer: A
Reference: Page # 81

Q.29 Which of the following methods is used to retrieve records?


A. Get() B. Find()
C. Retrieve() D. All()
Correct Answer: D
Reference: Page # 82, Heading 5.4.2

Q.30 Using which of the following methods can you select a column name?

Page 5 of 7
A. Big increments B. Get
C. where D. find
Correct Answer: C
Reference: Page # 83

Q.31 Which of the following methods is used to retrieve a specific record?


A. Retrieve() B. Find()
C. All() D. Get()
Correct Answer: B
Reference: Page # 83

Q.32 Which of the following best describes Chaining?


A. A collection object has multiple methods that B. Defining the ID column during database
returns another collection object migration
C. Using conventions over configurations D. Accessing values after retrieving
records
Correct Answer: A
Reference: Page # 83

Q.33 ____________ help in organizing codes by grouping requests that handle the codes in a single
route and class
A. Models B. Controllers
C. Views D. Applications
Correct Answer: B
Reference: Page # 102, Heading 6.2

Q.34 A _______ is preconfigured using a single line of artisan command


A. Single action controller B. Moderate controller
C. Resource Controller D. Class view
Correct Answer: C
Reference: Page # 104, Heading 6.3

Q.35 The update operation is similar to the ___________ operation


A. Edit B. Yield
C. Update D. Create
Correct Answer: D
Reference: Page # 118, Heading 6.3.4

Q.36 ______ helps in implementing CRUD operations


A. Routes B. Eloquent ORM
C. Operators D. DB query builder class
Correct Answer: D
Reference: Page # 62, Heading 4.4.2

Page 6 of 7
Q.37 Which of the following statements is true?
(1) The code folder inside the homestead directory and the homestead environment are the same.
(2) By default, Laravel has route class, Which has only one method to handle each type of HTTP
request.
A. Both 1 and 2 B. Only 2
C. None of these D. Only 1
Correct Answer: D
Reference: Page # 47, Heading 3.5

Q.38 _________ refers to the concept of sending records in blocks


A. Validation B. Pagination
C. Routing D. Authentication
Correct Answer: B
Reference: Page # 126, Heading 6.6

Q.39 The basic content of a web application are written in the _________
A. Template engine B. Local file
C. Master template D. Public folder
Correct Answer: C
Reference: Page # 66, Heading 4.5

Page 7 of 7

You might also like