Laravel 7 Set 1
Free Online Best Laravel MCQ Questions for improve your basic knowledge of Laravel Framework. This Laravel 7 Set 1 test that contains 25 Multiple Choice Questions with 4 options. You have to select the right answer to a question.
Start
Congratulations - you have completed Laravel 7 Set 1.
You scored %%SCORE%% out of %%TOTAL%%.
Your performance has been rated as %%RATING%%
Your answers are highlighted below.
Question 1 |
Which Artisan command is used to flush the application cache?
A | cache:clear |
B | cache:flush |
C | cache:forget |
D | cache:remove |
Question 2 |
Which directory contain “robot.txt” file ?
A | app |
B | public |
C | config |
D | storage |
Question 3 |
What is the minimum PHP version required to install Laravel 7?
A | 7.0 or upper version |
B | 5.6.4 |
C | 4.5 |
D | 6.2 |
Question 4 |
What would this touch() function do?
A | store a user object in cache |
B | update updated_at to current timestamp |
C | created a new filed in database |
D | None of these |
Question 5 |
Which command is used to start laravel server?
A | php artisan serve |
B | php artisan start |
C | php artisan start-server |
D | php artisan project_name |
Question 6 |
What is the syntax to check if the user is logged in?
A | if (session('auth')) |
B | if (auth()->exists()) |
C | if (auth()) |
D | if (auth()->check()) |
Question 7 |
Which directory not in side the app directory?
A | Broadcasting |
B | Events |
C | resources |
D | Console |
Question 8 |
Bootstrap directory in Laravel is used to ..............
A | Load the configuration files |
B | Call laravel library functions |
C | Initialize a Laraval application |
D | Load laravel classes and models |
Question 9 |
What is a the default file storing Laravel error logs as they happen?
A | storage/logs/laravel.log |
B | config/errors.php |
C | public/exceptions.txt |
D | app/Error.php |
Question 10 |
Where can you find a default timezone set?
A | config/app.php |
B | config/timezone.php |
C | config/carbon.php |
D | config/env.php |
Question 11 |
How to enable query log in Laravel?
A | DB::connection()->enableQueryLog(); |
B | DB::connection()->enableLog(); |
C | DB::connection()->QueryLog(); |
D | None of the above |
Question 12 |
How to disabled maintenance mode in Laravel?
A | php artisan down |
B | php artisan exit |
C | php artisan -m |
D | php artisan Up |
Question 13 |
How to set a session data in Laravel?
A | $request->db->session('key', 'value'); |
B | $request->session()->set('key', 'value'); |
C | $request->session()->put('key', 'value'); |
D | None of These |
Question 14 |
What does the vendor directory contains?
A | Assets |
B | Third-party code |
C | Configuration files |
D | Laravel Framework code |
Question 15 |
In Laravel Interpolation done by using below which symbol/ file?
A | {{}} |
B | middleware |
C | helper |
D | None of the above |
Question 16 |
The vendor directory contains
A | Assets |
B | Laravel Framework code |
C | Third-party code |
D | Configuration files |
Question 17 |
Which one is the Laravel command line interface?
A | CLI |
B | php artisan |
C | composer |
D | git |
Question 18 |
Which artisan command is used to remove the compiled class file?
A | clear:all |
B | clear compiled |
C | compiled:clear |
D | clear-compiled |
Question 19 |
How to check current laravel version install your system?
A | php artisan --version |
B | php artisan check --version |
C | php artisan make --version |
D | None of these |
Question 20 |
What is ORM in laravel 7?
A | Overloaded-relational Mapping |
B | Object-related Modifier |
C | Object-relational Mapping |
D | Object-Rotational Mechanisim |
Question 21 |
How many database fields are created with "$table->timestamps()" function in migrations file?
A | 1 |
B | 2 |
C | 5 |
D | none |
Question 22 |
What is Blade?
A | migration |
B | framework |
C | package |
D | Template Engine |
Question 23 |
php artisan key:generate Typically, it generates a string of what length?
A | 6 characters |
B | 16 characters |
C | 32 characters |
D | random length |
Question 24 |
How to get current action name in Laravel 7?
A | request()->DB->getActionMethod() |
B | request()::route()->getActionMethod() |
C | Route::currentRouteName(); |
D | None of these |
Question 25 |
How to get IP address in Laravel 7?
A | Request::ip(); |
B | $request::ip_address(); |
C | $request->ipAddress(); |
D | None of these |
Once you are finished, click the button below. Any items you have not completed will be marked incorrect.
Get Results
There are 25 questions to complete.
← |
List |
→ |
Return
Shaded items are complete.
1 | 2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 |
End |
Return
You have completed
questions
question
Your score is
Correct
Wrong
Partial-Credit
You have not finished your quiz. If you leave this page, your progress will be lost.
Correct Answer
You Selected
Not Attempted
Final Score on Quiz
Attempted Questions Correct
Attempted Questions Wrong
Questions Not Attempted
Total Questions on Quiz
Question Details
Results
Date
Score
Hint
Time allowed
minutes
seconds
Time used
Answer Choice(s) Selected
Question Text
All done
Need more practice!
Keep trying!
Not bad!
Good work!
Perfect!