laravel 5 Set 2
Free Online Best laravel 5 MCQ Questions for improve your basic knowledge of laravel 5. This laravel 5 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 5 Set 2.
You scored %%SCORE%% out of %%TOTAL%%.
Your performance has been rated as %%RATING%%
Your answers are highlighted below.
Question 1 |
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 2 |
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 3 |
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 4 |
In which directory controllers are located in Laravel ?
A | app/Controllersdirectory |
B | route/http/Controllersdirectory |
C | app/http/Controllersdirectory |
D | vendor/Controllersdirectory |
Question 5 |
Which class is used to handle exceptions?
A | AppControllerHandler |
B | RouteExceptionsHandler |
C | AppExceptionsHandler |
D | PublicExceptionsHandler |
Question 6 |
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 7 |
Which method doesn't exist in default resource Controller of Laravel?
A | destroy |
B | list |
C | show |
D | create |
Question 8 |
user is redirected with flashed data. How that 'status' variable can be used after redirect?
A | $request->status; |
B | session('status'); |
C | get:status; |
D | $status |
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 |
The View files Extension in Laravel 5?
A | .vue |
B | .blade |
C | .php |
D | .blade.php |
Question 11 |
In which language Laravel is written ?
A | Python |
B | Java |
C | .NET |
D | PHP |
Question 12 |
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 13 |
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 14 |
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 15 |
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 16 |
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 17 |
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 18 |
How to get current environment in Laravel?
A | Create::environment(); |
B | Get::environment(); |
C | App::environment(); |
D | None of these |
Question 19 |
_____() in laravel 5 used for
A | Printing value |
B | For string translation |
C | Both Printing value & string translation |
D | None of these |
Question 20 |
If you want to create your own config file in config/ folder, what should be the returned value inside of that file?
A | Array |
B | string |
C | Object of Config class |
D | Anything |
Question 21 |
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 22 |
"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 23 |
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 24 |
In Laravel 5, all controllers by default should extend Controller. If you want to edit or add some code to that "main" controller, where is it located?
A | in app/Http/Controller folder |
B | in app/resource/Controller folder |
C | in resouce/Controller folder |
D | in vendor folder |
Question 25 |
Which method breaks the collection into multiple, smaller collections of a given size
A | Break() |
B | split() |
C | chunk() |
D | implode() |
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!