laravel/framework — pull request #3851 by Gufran (2014-03-10 21:13:52+00:00)
Title: Dependency injection - inject instance bound in container

@taylorotwell Go easy on this one please, I hope you can see the benefits.

This is a little something for those situations when you wish to get rid of facades and inject the object behind facade as a dependency.
This will try to resolve the instance bound into container by service providers (object used by Facades to defer the method call) and inject them as a dependency.
So for example if `Html` facade use instance of 'html' and IoC container resolves 'html' to `Illuminate/Html/HtmlBuilder` you'd be able to inject it directly into the constructor by typehinting `html` and container will know what to inject.

```
class SomeClass {

// type-hint it with same name as registered into the container
public function __construct(html $html)
{
$this->html = $html;
}
}

$object = App::make('SomeClass');
```
Guess what ? The injected instance is actually `Illuminate/Html/HtmlBuilder` which is registered into the container by `HtmlServiceProvider`.

If this PR is accepted (_which I really highly doubt_) I'd also like to rename facade accessors to improve semantics.