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 |
Which method doesn't exist in default resource Controller of Laravel?
A | destroy |
B | list |
C | show |
D | create |
Question 2 |
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 3 |
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 4 |
In which language Laravel is written ?
A | Python |
B | Java |
C | .NET |
D | PHP |
Question 5 |
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 6 |
"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 7 |
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 8 |
Which class is used to handle exceptions?
A | AppControllerHandler |
B | RouteExceptionsHandler |
C | AppExceptionsHandler |
D | PublicExceptionsHandler |
Question 9 |
How to get current environment in Laravel?
A | Create::environment(); |
B | Get::environment(); |
C | App::environment(); |
D | None of these |
Question 10 |
..........() in laravel 5 used for
A | Printing value |
B | For string translation |
C | Both Printing value & string translation |
D | None of these |
Question 11 |
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 12 |
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 13 |
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 14 |
How to install tinker?
A | composer require tinker |
B | omposer require tinker/laravel |
C | composer require laravel/tinker |
D | None of these |
Question 15 |
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 16 |
How to disabled maintenance mode in Laravel?
A | php artisan down |
B | php artisan exit |
C | php artisan -m |
D | php artisan Up |
Question 17 |
The View files Extension in Laravel 5?
A | .vue |
B | .blade |
C | .php |
D | .blade.php |
Question 18 |
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 19 |
dd() Stand for___
A | Dump and Die |
B | Dump and dual |
C | Dummy and Die |
D | None of these |
Question 20 |
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 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 |
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 23 |
Which method breaks the collection into multiple, smaller collections of a given size
A | split() |
B | chunk() |
C | implode() |
D | Break() |
Question 24 |
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 25 |
How can we check the logged-in user info in Laravel?
A | User() function |
B | Admin() function |
C | UserInfo() function |
D | GetUser() function |
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!