title: Unresolvable dependency resolving [Parameter #0 [ <required> $name ]]
body: <p><strong>Warning:</strong> This question is Laravel 4 specific.</p>
  <p>I've been using Facades in my controllers before. Therefore I know the code is working. Now I need to introduce dependency injection for various reasons.</p>
  <p>After refactoring the controller I get following error:</p>
  <blockquote>
  <p>Illuminate \ Container \ BindingResolutionException</p>
  <p>Unresolvable dependency resolving [Parameter #0 [  $name ]].</p>
  </blockquote>
  <p>I can't figure out where the problem is. The Error message seems cryptic to me and I don't understand it. (I don't see any problem with my <code>__constructor</code> parameters since I've registered the binding for the <code>HelpersInterface</code>)</p>
  <p>Here are the important parts of my code:</p>
  <p><strong>File: app/start/global.php</strong></p>
  <pre><code>&lt;?php
   
  // ...
   
  App::bind('Acme\Interfaces\HelpersInterface', 'Acme\Services\Helpers');
  </code></pre>
  <p><strong>File: composer.json</strong></p>
  <pre><code>// ...
   
  &quot;autoload&quot;: {
      // ...
      &quot;psr-0&quot;: {
          &quot;Acme&quot;: &quot;app/&quot;
      }
  },
   
  // ...
  </code></pre>
  <p><strong>File: app/Acme/Controllers/BaseController.php</strong></p>
  <pre><code>&lt;?php namespace Acme\Controllers;
   
  use Carbon\Carbon;
  use Controller;
  use Illuminate\Foundation\Application as App;
  use Illuminate\View\Factory as View;
  use Acme\Interfaces\HelpersInterface as Helpers;
  use Illuminate\Http\Response;
   
  class BaseController extends Controller {
   
      /**
       * @var \Illuminate\Foundation\Application
       */
      private $app;
   
      /**
       * @var \Carbon\Carbon
       */
      private $carbon;
   
      /**
       * @var \Illuminate\View\Factory
       */
      private $view;
   
      /**
       * @var \Acme\Interfaces\HelpersInterface
       */
      private $helpers;
   
      function __construct(App $app, Carbon $carbon, View $view, Helpers $helpers)
      {
          $this-&gt;app = $app;
          $this-&gt;carbon = $carbon;
          $this-&gt;view = $view;
          $this-&gt;helpers = $helpers;
   
          $lang = $this-&gt;app-&gt;getLocale();
          $now = $this-&gt;carbon-&gt;now();
   
          $this-&gt;view-&gt;share('lang', $lang);
          $this-&gt;view-&gt;share('now', $now);
      }
   
      /**
       * Missing Method
       *
       * Abort the app and return a 404 response
       *
       * @param array $parameters
       * @return Response
       */
      public function missingMethod($parameters = array())
      {
          return $this-&gt;helpers-&gt;force404();
      }
   
  }
  </code></pre>
  <p><strong>File: app/Acme/Services/Helpers.php</strong></p>
  <pre><code>&lt;?php namespace Acme\Services;
  
  use Illuminate\Config\Repository as Config;
  use Illuminate\Database\Connection as DB;
  use Illuminate\Http\Request;
  use Illuminate\Routing\Redirector as Redirect;
  use Illuminate\Session\Store as Session;
  use Illuminate\Support\Facades\Response;
  use Illuminate\Translation\Translator as Lang;
  use Illuminate\View\Factory as View;
  use Acme\Interfaces\MockablyInterface;
  use Monolog\Logger as Log;
  
  class Helpers implements HelpersInterface {
  
  // ...
  
      public function __construct(
          Config $config,
          Lang $lang,
          View $view,
          MockablyInterface $mockably,
          Log $log,
          Request $request,
          Session $session,
          DB $db,
          Redirect $redirect,
          Response $response
      ) {
          // ...
      }
  
  // ...
  
  }
  </code></pre>
  <p><strong>File: app/Acme/Providers/HelpersServiceProvider.php</strong></p>
  <pre><code>&lt;?php namespace Acme\Providers;
  
  use Illuminate\Support\ServiceProvider;
  use Acme\Services\Helpers;
  
  class HelpersServiceProvider extends ServiceProvider {
  
  private $db;
  private $defaultDbConnection;
  
  protected function init()
  {
      $this-&gt;db = $this-&gt;app['db'];
      $this-&gt;defaultDbConnection = $this-&gt;db-&gt;getDefaultConnection();
  }
  
  public function register()
  {
      $this-&gt;init();
  
      $this-&gt;app-&gt;bind('helpers', function ()
      {
          return new Helpers(
              $this-&gt;app['config'],
              $this-&gt;app['translator'],
              $this-&gt;app['view'],
              $this-&gt;app['mockably'],
              $this-&gt;app-&gt;make('log')-&gt;getMonolog(),
              $this-&gt;app['request'],
              $this-&gt;app['session.store'],
              $this-&gt;db-&gt;connection($this-&gt;defaultDbConnection),
              $this-&gt;app['redirect'],
              $this-&gt;app['Illuminate\Support\Facades\Response']
          );
      });
  }
  </code></pre>