Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

AWD - Midterm Quiz

Total questions: 15

Worksheet time: 15mins

Name
Class
Date
1.

In which file is the application's route file defined in Laravel?

a)

routes/api.php

b)

routes/console.php

c)

routes/web.php

d)

routes/middleware.php

2.

How is web.php file created or generated in Laravel?

a)

Manually by the developer

b)

Automatically by the Laravel framework

c)

Through artisan commands

d)

By configuring the routes.php file

3.

What is the purpose of the web.php file in Laravel?

a)

Defining routes for API endpoints

b)

Defining routes for console commands

c)

Defining routes for web pages and HTTP requests

d)

Defining database for routes

4.

Which of the following is NOT a characteristic of REQUIRED PARAMETERS for web application routing?

a)

Optional to capture

b)

Mandatorily captured

c)

Essential for routing

d)

User identification number

5.

How can developers make parameters optional in the URL?

a)

By using a default value for parameters

b)

By excluding parameters from the URL

c)

By including a "?" after the parameter name

d)

By making parameters mandatory

6.

What is the main advantage of using the blade template engine in Laravel?

a)

Faster database queries

b)

Automatic form validation

c)

Easy creation of master or main templates

d)

Improved routing system

7.

How does Laravel recognize blade templates?

a)

By adding laravel in the name of the file

b)

By using the public folder to save the files

c)

By adding a specific tag to the template

d)

By checking for a .blade.php extension

8.

Where are all the blade templates stored in a Laravel application?

a)

public/views

b)

app/views

c)

resources/templates

d)

resources/views

9.

What is required to extend a master template in a blade file?

a)

@extends directive

b)

@include directive

c)

@extend directive

d)

@master directive

10.

Which syntax is used to display a variable inside a Blade view?

a)

[ $variable ]

b)

{{ $variable }}

c)

{ $variable }

d)

@variable

11.

Where are Controllers typically stored in a Laravel project?

a)

app/Models

b)

app/Http/Routes

c)

app/Views

d)

app/Http/Controllers

12.

Which command is used to create a controller using the Artisan CLI?

a)

php artisan create:controller <controller-name>

b)

php artisan make:controller <controller-name>

c)

php create:controller <controller-name>

d)

php make:controller <controller-name>

13.

what is the correct syntax for using a controller in the routes/web.php file?

a)

Route::get('/', [controller_name::class, 'class_name']);

b)

Route::create('/', [controller_name::class, 'class_name']);

c)

Route::controller('/', [controller_name::class, 'class_name']);

d)

Route::add('/', [controller_name::class, 'class_name']);

14.

Which HTTP method is typically employed when submitting data to a website?

a)

GET

b)

PATCH

c)

POST

d)

OPTIONS

15.

What does the Illuminate\Http\Request instance provide in Laravel?

a)

Access to database connections

b)

Access to file storage

c)

A rich set of methods to get information about the current HTTP request

d)

Access to Laravel configuration files