PHP EXAM QUESTIONS AND ANSWERS
Foreign key relationships can only be formed if the data types are equal - Answers -t
The advantage of the share() method vs. the composer() method is that the share
method allows you to specify which views will recieve the data - Answers -f
Data can be passed to the view partial by passing a second argument in the blade
directive - Answers -t
Many-to-Many relationships are not supported by Laravel - Answers -f
When using a belongsTo relationship from the child model, the associate() method may
be used to attach the foreign id of the parent model - Answers -t
To generate a complete set of resource routes, use
Route::resource('resource','controller') - Answers -t
The share method is similar to View Composers except they act as a callback instead -
Answers -f
Providing an asterisk (*) as the the first argument to the view composer will bootstrap all
views - Answers -t
When creating a pivot table for a relation between the roles and users tables, the new
pivot table must be called user_role - Answers -f
Many-to-Many relationships use pivot tables to define relations between two tables -
Answers -t
The pluck() method will a return a collection containing ONLY the values for the given
keys passed as the parameters to the method - Answers -t
A delete route uses the destroy method type - Answers -f
Migration resets are destructive actions while rollbacks are not - Answers -f
Use the "-m" option when creating a new migration using Artisan to automatically create
the associated model - Answers -f
The database seeder uses the model factory to determine the data to be inserted into
each field - Answers -t
By default, Laravel creates all id fields as signed integers - Answers -f
Foreign key relationships can only be formed if the data types are equal - Answers -t
The advantage of the share() method vs. the composer() method is that the share
method allows you to specify which views will recieve the data - Answers -f
Data can be passed to the view partial by passing a second argument in the blade
directive - Answers -t
Many-to-Many relationships are not supported by Laravel - Answers -f
When using a belongsTo relationship from the child model, the associate() method may
be used to attach the foreign id of the parent model - Answers -t
To generate a complete set of resource routes, use
Route::resource('resource','controller') - Answers -t
The share method is similar to View Composers except they act as a callback instead -
Answers -f
Providing an asterisk (*) as the the first argument to the view composer will bootstrap all
views - Answers -t
When creating a pivot table for a relation between the roles and users tables, the new
pivot table must be called user_role - Answers -f
Many-to-Many relationships use pivot tables to define relations between two tables -
Answers -t
The pluck() method will a return a collection containing ONLY the values for the given
keys passed as the parameters to the method - Answers -t
A delete route uses the destroy method type - Answers -f
Migration resets are destructive actions while rollbacks are not - Answers -f
Use the "-m" option when creating a new migration using Artisan to automatically create
the associated model - Answers -f
The database seeder uses the model factory to determine the data to be inserted into
each field - Answers -t
By default, Laravel creates all id fields as signed integers - Answers -f