I know how an Inversion of Control container works and I know how to create one myself. But I only know how to do this by utilizing register and resolve methods.
I have looked in the Laravel documentation but I am stuck on trying to figure out how Laravel can resolve a dependency based on typehinting. Where is the missing link for this exact part?
When I am using a more traditional IoC container where I manually resolve stuff, I at least have to call a static method to get going. Laravel does not seem to need any of this.
Can somebody steer me in the right direction or set up a tiny example?
I have worked my way through:
As a recap. Maybe somebody could set up a quick example with automatic resolution for typehinting or is this really complex?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire