Hi bonty,
Laravel takes away alot of the hassle of handling dependency injection. Make sure you read through [http://laravel.com/docs/ioc] and more specifically [http://laravel.com/docs/ioc#service-providers]. The concept of an IoC container can be confusing at first but once you start to hand all your dependencies to the IoC container you'll wonder how you lived without it.
All dependencies are created by laravel automatically by checking the typehint of each variable in the class constructor. If that dependency needs to be set up in a way that the IoC doesn't by default just do that set up in a service provider and bind that new instance to its class name.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community