lundi 21 mars 2016

Laravel Method Injection for Created Classes

I'm currently using a service layer for my Laravel app. This is what the controllers will call to do any sort of processing, rather than containing the logic themselves. Since the service classes are just regular classes, is there a way for me to utilize dependency injection for them, more specifically method injection?

I've been using the constructors for all of the dependency injection, but sometimes I just need a class for one method (like another service for example).



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire