The IoC container in Laravel is a hidden diamond in the rough that not a lot of people seem to know about. It allows for dependency injection and extremely testable code. However, there was a bug in it so that you could not resolve any class that used optional parameters in it’s constructors (including Eloquent). The bug had been fixed in Laravel 4 which is still not out for beta, so I decided to backport this to Laravel 3 for Taylor (since he’s really busy with L4).
I also snuck in some extra functionality. The ability to pass in parameters to the resolve. This allows us to override the resolve if we need to do so which is a nice feature when using a lot of nested DI (especially if you’re componsating for testing doubles). See below