Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Explain Constructor Injection ?



Explain Constructor Injection ?..

Answer / 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

More Laravel PHP Framework Interview Questions

What is a pull() ?

0 Answers  


What is laravel passport?

0 Answers  


what is meant by CSRF Protection in Laravel ?

1 Answers  


How to register a middleware in laravel 5?

0 Answers  


In which folder robot.txt is placed?

0 Answers  


What do you understand by unit testing?

0 Answers  


What is name of first file that loaded in laravel?

0 Answers  


Does laravel use bootstrap?

0 Answers  


How to enable or disable maintaince mode in laravel.

0 Answers  


How to make a custom validation rule in laravel?

0 Answers  


What is a facade?

0 Answers  


Explain reverse routing in laravel.

0 Answers  


Categories