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

Assignment-Laravel Framework for Web Applications with PHP [2.0]-7062

Uploaded by

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

Assignment-Laravel Framework for Web Applications with PHP [2.0]-7062

Uploaded by

samikhan031027
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 10

PRIME 2.

0 Sem2 LARAVEL
Book Name: Laravel Framework for Web Applications with PHP [2.0]
Q.1 In Laravel convention,________ are the preferred way to create records, not tables.
A. Keys B. Functions
C. Routes D. Strings
Correct Answer: Keys
Reference: Page no 33-34, Heading 2.3.4

Q.2 ________ act as a version control system for a database that includes many tables.

A. Database B. Storage

C. Chache D. Migration

Correct Answer: Migration


Reference: Page no 63, Heading 4.4.3

Q.3 _Laravel uses the ________ design pattern to facilitate development of web application in a
quick and easy manner.
A. CakePHP B. Codelgniter

C. Model-View-Controller D. Web Application

Correct Answer: Model-View-Controller

Reference: Page no 29, Heading 2.1

Q.4 Which of the following directories includes the views that will be used to
display the final Web pages as well as the un-compiled assests related to
JavaScript and CSS?
A. Bootstraps B. Resources
C. Storage D. Database

Correct Answer: Resources

Reference: Page no 34-35, Heading 2.4

Q.5 Which of the following enables the user to add elements to the project that
follow the Laravel convention?
A. Expression and custom B. namespace and functions

C. Yield and sections D. array and list

Correct Answer: Yield and sections

Reference: Page no 46, Heading 3.4

Page PAGE 10 of NUMPAGES 10


PRIME 2.0 Sem2 LARAVEL

Q.6 Although the Master Blade templates 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: Yield and sections

Reference: Page no 67, Heading Code Snippet :9

Q.7 The main reason to use the query builder over writing SQL code manually is
because ______________.
B. it writes different SQL codes depending
A. it is rich in features
on the database being used
C. it has few SQLite directives D. it use configuration mode for migration

Correct Answer: it writes different SQL codes depending on the database being used

Reference: Page no 83, Heading 5.4.2

Q.8 Functions that are defined in the model and that replace by a long chain with a simple one are
called _______.

A. Model Events B. Event Listeners

C. Eloquent ORM D. Query Scopes


Correct Answer: Query Scopes

Reference: Page no 92, Heading 5.5

Q.9 The ________ file in the 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: hosts

Reference: Page no 43, Heading 3.3.2

Page PAGE 10 of NUMPAGES 10


PRIME 2.0 Sem2 LARAVEL
Q.10 _______ 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: Routing

Reference: Page no 47, Heading 3.5

Q.11 Laravel recommends the use of _______ when writing codes.

A. models B. views

C. scripts D. keys

Correct Answer: models

Reference: Page no 38

Q.13 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: collating

Reference: Page no 48, Heading 3.6

Q.14 Which of the following terms BEST describes the statement 'Codes can independent or
interchanged based on the requirement?

A. static B. modularity
C. irrevocable D. configuring

Correct Answer: modularity

Reference: Page no 50, Heading 3.7

Page PAGE 10 of NUMPAGES 10


PRIME 2.0 Sem2 LARAVEL

Q.12 The _______ method uses the URL, two arguments, and the closure
function that is executed in response to the URL.

A. put B. push

C. get D. set

Correct Answer: get

Reference: Page no 47, Heading 3.5

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

A. schema builder class B. rows

C. foreign keys D. columns

Correct Answer: schema builder class

Reference: Page no 62, Heading 4.4.2

Q.16. __________ helps in implementing CRUD operations.

A. Routes B. Eloquent ORM


C. Operators D. DB query builder class

Correct Answer: Eloquent ORM


Reference: PAGE NO.97

Q.17. _______ refers to the concept of sending records in blocks.

A. Validation B. Pagination
C. Routing D. Authentication

Correct Answer: Pagination


Reference: HEADING 6.6 PAGE NO.126

Q.18. ________ acts as a version control system for a database that includes many tables.

A. Database B. Storage

Page PAGE 10 of NUMPAGES 10


PRIME 2.0 Sem2 LARAVEL

C. Cache D. Migration

Correct Answer: Migration


Reference: PAGE NO.63

Q.19. The ________ method is used to create a table

A. down B. up
C. create D. set

Correct Answer: create

Q.20. The Bootstrap CSS framework uses the ________ helper function

A. get() B. sort()

C. pluck() D. asset()

Correct Answer: asset()


Reference: PAGE NO.74

Q.21. The basic contents of a Web application are written in the _________.

A. template engine B. local file

C. master template D. public folder

Correct Answer: master template

Q.22. 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: $fillable


Reference: PAGE NO.89

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

Page PAGE 10 of NUMPAGES 10


PRIME 2.0 Sem2 LARAVEL
A. retrieve() B. find()

C. get() D. all()

Correct Answer: get()


Reference: PAGE NO.83

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

A. big Increments B. get


C. where D. find

Correct Answer: get


Reference: PAGE NO.83

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

A. retrieve() B. find()
C. all() D. get()

Correct Answer: find()


Reference: PAGE NO.83

Q.26. Which of the following BEST describes Chaining?

A. A collection object has multiple methods B. Defining the ID column during database
that return another collection object migration

C. Using conventions over configurations. D. Accessing values after retrieving records

Correct Answer: A collection object has multiple methods that return another collection
object
Reference: PAGE NO.83

Q.27. 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: Artisan Tool


Reference: PAGE NO.46

Page PAGE 10 of NUMPAGES 10


PRIME 2.0 Sem2 LARAVEL
Q.28. __________ helps in implementing CRUD operations.

A. Routes B. Eloquent ORM

C. Operators D. DB query builder class

Correct Answer: Eloquent ORM


Reference: PAGE NO.97

Q.29. _______ refers to the concept of sending records in blocks.

A. Validation B. Pagination

C. Routing D. Authentication

Correct Answer: Pagination


Reference: HEADING 6.6 PAGE NO.126

Q.30. ________ acts as a version control system for a database that includes many tables.

A. Database B. Storage

C. Cache D. Migration

Correct Answer: Migration


Reference: PAGE NO.63

Q.31. The ________ method is used to create a table

A. down B. up

C. create D. set

Correct Answer: up

Q.32. The Bootstrap CSS framework uses the ________ helper function

A. get() B. sort()

C. pluck() D. asset()

Correct Answer: asset()


Reference: PAGE NO.74

Q.33. The basic contents of a Web application are written in the _________.

Page PAGE 10 of NUMPAGES 10


PRIME 2.0 Sem2 LARAVEL
A. template engine B. local file

C. master template D. public folder

Correct Answer: master template

Q.34. 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: $fillable


Reference: PAGE NO.89

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

A. retrieve() B. find()

C. get() D. all()

Correct Answer: get()


Reference: PAGE NO.83

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

A. big Increments B. get

C. where D. find

Correct Answer: get


Reference: PAGE NO.83

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

A. retrieve() B. find()

C. all() D. get()

Correct Answer: find()


Reference: PAGE NO.83

Q.38. Which of the following BEST describes Chaining?

Page PAGE 10 of NUMPAGES 10


PRIME 2.0 Sem2 LARAVEL
A. A collection object has multiple methods B. Defining the ID column during database
that return another collection object migration

C. Using conventions over configurations. D. Accessing values after retrieving records

Correct Answer: A collection object has multiple methods that return another collection
object
Reference: PAGE NO.83

Q.39. 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: Artisan Tool


Reference: PAGE NO.46

Q.40. 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: cmd


Reference: PAGE NO.12

Q.41. 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: Mass Assignment

Q.42. The _________ array enables a user to update any value in the same database.

A. $data B. $update

C. $revoke D. $edit

Correct Answer: $data


Reference: PAGE NO.80

Page PAGE 10 of NUMPAGES 10


PRIME 2.0 Sem2 LARAVEL

Q.43. The GNU License information appears when you install _______.

A. Composer B. Vagrant

C. Homestead D. GitBash

Correct Answer: Composer


Reference: PAGE NO.18

Q.44. 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: vagrant box add laravel/homestead


Reference: PAGE NO.19

Page PAGE 10 of NUMPAGES 10

You might also like