Laravel Set 1
Free Online Best Laravel MCQ Questions for improve your basic knowledge of Laravel Framework. This Laravel 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 Set 1.
You scored %%SCORE%% out of %%TOTAL%%.
Your performance has been rated as %%RATING%%
Your answers are highlighted below.
Question 1 |
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 2 |
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 3 |
Which artisan command is used to remove the compiled class file?
A | clear:all |
B | clear compiled |
C | compiled:clear |
D | clear-compiled |
Question 4 |
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 5 |
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 6 |
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 7 |
Laravel is based on ________________
A | MVVM Design Pattern |
B | VVM Design Pattern |
C | MVC Design Pattern |
D | Composite Design Pattern |
Question 8 |
The vendor directory contains
A | Assets |
B | Laravel Framework code |
C | Third-party code |
D | Configuration files |
Question 9 |
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 10 |
What does the vendor directory contains?
A | Assets |
B | Third-party code |
C | Configuration files |
D | Laravel Framework code |
Question 11 |
Which Artisan command is used to flush the application cache?
A | cache:clear |
B | cache:flush |
C | cache:forget |
D | cache:remove |
Question 12 |
In Laravel Interpolation done by using below which symbol/ file?
A | {{}} |
B | middleware |
C | helper |
D | None of the above |
Question 13 |
Which directory not in side the app directory?
A | Broadcasting |
B | Events |
C | resources |
D | Console |
Question 14 |
Which one is the Laravel command line interface?
A | CLI |
B | php artisan |
C | composer |
D | git |
Question 15 |
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 16 |
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 17 |
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 18 |
How many database fields are created with "$table->timestamps()" function in migrations file?
A | 1 |
B | 2 |
C | 5 |
D | none |
Question 19 |
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 20 |
Which directory contain “robot.txt” file ?
A | app |
B | public |
C | config |
D | storage |
Question 21 |
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 22 |
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 23 |
What is ORM in laravel 5?
A | Overloaded-relational Mapping |
B | Object-related Modifier |
C | Object-relational Mapping |
D | Object-Rotational Mechanisim |
Question 24 |
What is Blade?
A | migration |
B | framework |
C | package |
D | Template Engine |
Question 25 |
How to get IP address in Laravel 5?
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!