Answer Posted / rachana devi
The Laravel service container is used to resolve all Laravel controllers.
As a result, you are able to type-hint any dependencies your controller may need in its constructor.
The dependencies will automatically be resolved and injected into the controller instance.
Example :
class MyClass
{
public $foo = 'bar';
}
Route::get('/myclass','ImplicitController@index');
we have to Add the following code to app/Http/routes.php file. "app/Http/routes.php".
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What are the major differences between laravel 4 and laravel 5.x?
What are traits in laravel?
List basic concepts in laravel?
Which template engine laravel use?
Tell me what are system requirement for laravel 5.0?
How to list all routes in laravel?
What is algolia search?
What are the difference between insert() and insertgetid() in laravel?
What is blade php in laravel?
What are bundles, reverse routing and the ioc container?
How can I learn laravel fast?
What are common http error codes?
What is artisan in laravel?
What is route in laravel?
Explain how to do environment configuration in laravel?