Laravel final

Laravel final

1st Grade

47 Qs

quiz-placeholder

Similar activities

General Computer Questions

General Computer Questions

1st - 5th Grade

42 Qs

UTS Sistem Komputasi Awan 2283C

UTS Sistem Komputasi Awan 2283C

1st Grade

50 Qs

Informatika kls 7

Informatika kls 7

1st Grade

47 Qs

ООП 2

ООП 2

1st Grade

50 Qs

Laravel final

Laravel final

Assessment

Quiz

Information Technology (IT)

1st Grade

Medium

Created by

Amine Hmidouche

Used 2+ times

FREE Resource

47 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which command in Laravel is used to create a new database migration?

php artisan make:database

php artisan create:migration

php artisan make:migration

php artisan generate:migration

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following methods is used to define a foreign key constraint in a Laravel migration file?

index

references

primary

foreignId

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following methods is used to define a default value for a column in a Laravel migration file?

nullable

default

inique

primary

4.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

Which of the following is a recommended way to retrieve a single record from a database table using Eloquent models?

findOrFail

find

first

paginate

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following methods is used to drop a table in a Laravel migration file?

dropTable

removeTable

deleteTable

dropIfExists

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following methods is used to define a pivot table for a many-to-many relationship in Laravel?

hasMany

belongsToMany

hasOne

belongsTo

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a valid way to define a relationship between two Eloquent models in Laravel?

Using the hasMany method

Using the hasOne method

Using the bolongsTo method

All of these

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?