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

Which template engine laravel use?

0 Answers  


How to configure clear route cache in laravel?

0 Answers  


Explain how to do 301 redirects in laravel?

0 Answers  


What is a check method ?

0 Answers  


Do you know what is php artisan.

0 Answers  


What are view composers?

0 Answers  


How to install laravel via laravel installer.

0 Answers  


What is Laravel - File Uploading ?

1 Answers  


How to use delete statement in laravel?

0 Answers  


How can we handle Error Handling in Laravel ?

1 Answers  


How will you explain guarded attribute in a laravel model?

0 Answers  


What is blade template engine?

0 Answers  


Categories