laravel 5 Set 1
Free Online Best laravel 5 MCQ Questions for improve your basic knowledge of laravel 5. This laravel 5 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 5 Set 1.
You scored %%SCORE%% out of %%TOTAL%%.
Your performance has been rated as %%RATING%%
Your answers are highlighted below.
Question 1 |
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 2 |
How to get IP address in Laravel 5?
A | $request->ip(); |
B | $request->ip_address(); |
C | $request->ipAddress(); |
D | None of these |
Question 3 |
Laravel is based on ________________
A | MVVM Design Pattern |
B | VVM Design Pattern |
C | MVC Design Pattern |
D | Composite Design Pattern |
Question 4 |
Which artisan command is used to remove the compiled class file?
A | clear:all |
B | clear compiled |
C | compiled:clear |
D | clear-compiled |
Question 5 |
How many database fields are created with "$table->timestamps()" function in migrations file?
A | 1 |
B | 2 |
C | 5 |
D | none |
Question 6 |
What is Blade?
A | migration |
B | framework |
C | package |
D | Template Engine |
Question 7 |
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 8 |
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 9 |
How to get current action name in Laravel 5?
A | request()->DB->getActionMethod() |
B | request()->route()->getActionMethod() |
C | request()->getActionMethod() |
D | None of these |
Question 10 |
Which Artisan command is used to flush the application cache?
A | cache:clear |
B | cache:flush |
C | cache:forget |
D | cache:remove |
Question 11 |
The vendor directory contains
A | Assets |
B | Laravel Framework code |
C | Third-party code |
D | Configuration files |
Question 12 |
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 13 |
How to install tinker?
A | composer require tinker |
B | omposer require tinker/laravel |
C | composer require laravel/tinker |
D | None of these |
Question 14 |
In Laravel Interpolation done by using below which symbol/ file?
A | {{}} |
B | middleware |
C | helper |
D | None of the above |
Question 15 |
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 16 |
What is the minimum PHP version required to install Laravel 5.3?
A | 7.2 |
B | 5.6.4 |
C | 4.5 |
D | 6.2 |
Question 17 |
Which directory contain “robot.txt” file ?
A | app |
B | public |
C | config |
D | storage |
Question 18 |
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 19 |
Which one is the Laravel command line interface?
A | CLI |
B | php artisan |
C | composer |
D | git |
Question 20 |
Laravel Eloquent API Resources were officially released in which Laravel version?
A | Laravel 5.0 |
B | Laravel 5.5 |
C | Laravel 6 |
D | Laravel 7 |
Question 21 |
dd() Stand for___
A | Dump and Die |
B | Dump and dual |
C | Dummy and Die |
D | None of these |
Question 22 |
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 23 |
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 24 |
Which directory not in side the app directory?
A | Broadcasting |
B | Events |
C | resources |
D | Console |
Question 25 |
How to disabled maintenance mode in Laravel?
A | php artisan down |
B | php artisan exit |
C | php artisan -m |
D | php artisan Up |
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!