1. Which method can be used to retrieve the record as an object containing the column names and the data stored in the record?
2. Which is true for Elixir and Gulp? (choose all that apply)
3. Which is route redirect methods? (Choose all that apply)
4. Which is correct Blade for/else syntax?
5. Which is the correct sample code to union two queries?
6. Which is correct route definitions? (Choose all that apply)
7. Which Request facades are available in Laravel? (Choose all that apply)
8. Which is correct redirects? (Choose all that apply)
9. Which is correct regular expression route constraints?
10. Which valid validation rules? (Choose all that apply)
11. Which route is created by below route declaration? (Choose all that apply) Route::resource('photos', 'PhotoController');
12. Which can be applied to route group? (Choose all that apply)
13. Which is valid blade directives? (Choose all that apply)
14. Which DB facades allows you to execute raw commands or queries?
15. Which HTML form actions are not supported?
16. Which is the correct code to select data from database?
17. How to escape output in blade?
18. Which php artisan command create tables in database on initial run?
19. Which function can be used for named routes in your views?
20. Which is correct command to save an uploaded file?
21. Which is correct form encoding for file uploads?
22. Which is ignored by blade?
23. Which is correct to redirect named route 'photos.index'?
24. Which method should be used to alter the columns of an existing table?
25. Which static method can be used with our models? (choose all that apply)
26. Which can be used to add images in a view?
27. Which can be used in Schema::create() method?
28. Which is correct to pass $name variable to views?
29. Which loop is available in blade?
30. Output of following in view if $name = 'Andy'? Welcome, {{ $name or 'John' }}
31. Which validation rule is correct to validate that the file is an image file having dimensions of min 200 height x min 400 width?
32. To get a single column from Database table we can chain one of the following method?
33. Which is required before using @section and @endsection in blade file?
34. To define a callback when view is rendered we can use:
35. To execute the following statement without error, which is correct? $flight = App\User::create(['name' => 'John Doe']);
36. Which can be used in views to print a message if array is empty?
37. Which is correct to loop over an array named $lists in view?
38. Which is convenient and correct way to automatically inject the model instances directly into your routes?
39. Which method can be used to apply common properties to collection of routes?
40. Which artisan command is correct to create a model with table named 'projects'?
41. Which is correct to create a model named 'Person' with accompanying migration?
42. To apply common properties to collection of routes we can use one of the following method?
43. How to route when using URL query string?
44. If we have a following URL http://myapp.dev/?foo=bar&baz=boo Which will get the values of 'foo' and 'baz'?
45. Which validator methods returns 'True' when form data is valid?
46. Using Form class to add the 'disabled' attribute for some options.
47. Add default value to select list in form.
48. Which can be included in route definition to validate form data?
49. Which is correct to delete a model with primary key 2?
50. Which facade can be used to get the current URL for the request?
51. Which is correct to include a section('content') in your template?
52. Which is correct syntax for passing data to views?
53. Which is shortcut for ternary statement in blade?
54. The following option will allow you to upload an image with many to many relationships:
55. Which is correct directory for view files?
56. Which is executed first?
57. Which is correct for blade template?
58. To reference a view view('user.profile', $data); Which is correct name and path for view file?
59. Suppose we have a collection which contains the website news. What is the best way to share that collection in all views?
60. Which is the last parameter for @each directive in blade?
61. Which is correct to render the expression using javascript instead of blade?
62. Which is correct to display unescaped data in blade?
63. Which will list all routes?
64. Which is true to get the URL of an image 'img/logo.png' from route '/example' ?
65. Route parameters should not have underscore '_' character?
66. Which is correct to get the URL of named route 'contact'?
67. Which is correct route methods?
68. Which code is correct to insert multiple records?
69. Which is correct to retrieve all comments which are associated with single Post (post_id = 1) with one to many relation in Model?
70. Get only selected column from database table.
71. Which database is supported by Laravel 5?
72. Which is correct to retrieve soft deleted models?
73. Which is correct to get all rows from the table named users?
74. Creating database view in migration laravel 5.2
75. All eloquent models protect against mass-assignment by default.
76. Eloquent can fire the following events allowing you to hook into various points in the model's lifecycle. (choose all that apply)
77. To retrieve all blog posts that have at least one comment. (Model has one to many relation already set up)
78. The migrations directory contains PHP classes which allow Laravel to update the Schema of your current __, or populate it with values while keeping all versions of the application in sync. Migration files must not be created manually, as their file name contains a timestamp. Instead usetheArtisanCLIinterfacecommand php artisan migrate:make to create a new Migration.
79. Which method will retrieve the first result of the query in Laravel eloquent?
80. Which command should be used to run all outstanding migration?
81. Which method is provided by migration class?
82. If you don't want Eloquent to automatically manage created_at and updated_at columns, which of the following will be correct?
83. Which file contains the database configurations?
84. Which is a correct way to assign middleware 'auth' to a route?
85. To share route attributes, it is best to use route groups?
86. How to get Header Authorization key in controller?
87. Which is correct for route definitions?
88. \Config::set('database.connections.customers.database', 'db_A');
89. Which method can be used to store items in cache permanently?
90. List out few different return types of a controller action method?
91. Which view facade within a service provider's boot method can be used to share data with all views?
92. Which controller should be extended by all controllers?
93. Which variable is available inside your loops in blade?
94. If blog post has infinite number of comments we can define one-to-many relationship by placing following code in post model?
95. To create a controller which handles all 'CRUD' routes, which is correct command?
96. Which can be used to create a controller with typical 'CRUD' routes?
97. Which method can be used with models to build relationships?
98. Use a validation rules inside the custom validation class?
99. Which is/are correct to define custom validation messages?
100. Which is correct to define middleware for multiple views in controller file?
BackBone.js
Apache Server
Web Building
Web Development
Front-end Development
Web Graphics Design Principles
Related MCQ's