Laravel Set 2
Free Online Best Laravel MCQ Questions for improve your basic knowledge of Laravel Framework. This Laravel Set 2 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 2.
You scored %%SCORE%% out of %%TOTAL%%.
Your performance has been rated as %%RATING%%
Your answers are highlighted below.
Question 1 |
What is @yield used for?
A | To extend an layout |
B | To include a file |
C | To display the contents of a given |
D | None of these |
Question 2 |
How to delete a session data in Laravel 5?
A | $request->session()->forget('key'); |
B | $request->session()->delete('key'); |
C | $request->session()->unset('key'); |
D | $request->session()->unlink('key'); |
Question 3 |
How to install tinker?
A | composer require tinker |
B | omposer require tinker/laravel |
C | composer require laravel/tinker |
D | None of these |
Question 4 |
Which method doesn't exist in default resource Controller of Laravel?
A | destroy |
B | list |
C | show |
D | create |
Question 5 |
..........() in laravel 5 used for
A | Printing value |
B | For string translation |
C | Both Printing value & string translation |
D | None of these |
Question 6 |
How to redirect to another page in Laravel?
A | return redirect::toview('/name') |
B | return redirect('/name') |
C | return redirect::('/name') |
D | None of these |
Question 7 |
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 8 |
How to disabled maintenance mode in Laravel?
A | php artisan down |
B | php artisan exit |
C | php artisan -m |
D | php artisan Up |
Question 9 |
How can we check the logged-in user info in Laravel?
A | User() function |
B | Admin() function |
C | UserInfo() function |
D | GetUser() function |
Question 10 |
What is use of .env in Laravel?
A | Verify Log files |
B | For running cron jobs |
C | For setting environment variables |
D | None of these |
Question 11 |
How to set cookies in Laravel 5?
A | Cookie::config($name, $value, $minutes); |
B | Cookie::withCookie($name, $value, $minutes); |
C | Cookie::Set($name, $value, $minutes); |
D | Cookie::queue($name, $value, $minutes); |
Question 12 |
How to create a constant in Laravel and used in Globally.?
A | Config::post('constants.VaribleName'); |
B | Config::get('constants.VaribleName'); |
C | Config::get('constants')->('VaribleName'); |
D | None of these |
Question 13 |
In Blade layout, command "@section('header')" in "child" template implements which command from "parent" Blade template?
A | start |
B | include |
C | extend |
D | yield |
Question 14 |
Which method breaks the collection into multiple, smaller collections of a given size
A | split() |
B | chunk() |
C | implode() |
D | Break() |
Question 15 |
Which class is used to handle exceptions?
A | AppControllerHandler |
B | RouteExceptionsHandler |
C | AppExceptionsHandler |
D | PublicExceptionsHandler |
Question 16 |
dd() Stand for___
A | Dump and Die |
B | Dump and dual |
C | Dummy and Die |
D | None of these |
Question 17 |
What is the HTTP status code returned if some API endpoint is under Auth middleware, and the user is not logged in?
A | 401 |
B | 403 |
C | 500 |
D | 200 |
Question 18 |
what is the default API Rate Limit? In other words, how many requests can be done in one minute?
A | 100 |
B | 3600 |
C | 60 |
D | 600 |
Question 19 |
Blade command @csrf generates what kind of HTML code?
A | Input field with hidden type |
B | Login form |
C | required field |
D | Submit button |
Question 20 |
"Laravel Passport provides a full XXXXXX server implementation for your Laravel application". What's behind XXXXXX?
A | OAuth2 |
B | API |
C | JWT |
D | Back-end |
Question 21 |
How to check request is ajax or not ?
A | $post->ajax() method |
B | $request->ajax() method |
C | $send->ajax() method |
D | $set->ajax() method |
Question 22 |
If we're using mail driver 'log', then the email texts instead of being sent will be ...
A | Not stored anywhere |
B | Stored in database table |
C | Stored in laravel.log file |
D | Still sent but to the testing email address |
Question 23 |
The View files Extension in Laravel 5?
A | .vue |
B | .blade |
C | .php |
D | .blade.php |
Question 24 |
In which language Laravel is written ?
A | Python |
B | Java |
C | .NET |
D | PHP |
Question 25 |
How to get current environment in Laravel?
A | Create::environment(); |
B | Get::environment(); |
C | App::environment(); |
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!