title: How do I solve "Target [Interface] is not instantiable" in Laravel 4?
body: <p>My error message:</p>
  
  <pre><code>Illuminate \ Container \ BindingResolutionException 
  Target [Project\Backend\Service\Validation\ValidableInterface] is not instantiable.
  </code></pre>
  
  <p>I understand that interfaces and abstract classes are not instantiable so I know that Laravel should not be trying to instantiate my interface. Yet somehow it's trying to and I suspect this may be a binding issue...even though I believe I have bound it correctly and have registered it as a service provider.</p>
  
  <p>I should mention that I have taken this example out of Chris Fidao's "Implementing Laravel" and it's almost identical!</p>
  
  <p>This is the first couple of lines of my form class:</p>
  
  <pre><code>namespace Project\Backend\Service\Form\Job;
  
  use Project\Backend\Service\Validation\ValidableInterface;
  use Project\Backend\Repo\Job\JobInterface;
  
  class JobForm {
  
      /**
       * Form Data
       *
       * @var array
       */
      protected $data;
  
      /**
       * Validator
       *
       * @var \Project\Backend\Form\Service\ValidableInterface
       */
      protected $validator;
  
      /**
       * Job repository
       *
       * @var \Project\Backend\Repo\Job\JobInterface
       */
      protected $job;
  
      public function __construct(ValidableInterface $validator, JobInterface $job)
      {
          $this-&gt;validator = $validator;
          $this-&gt;job = $job;
      }
  </code></pre>
  
  <p>This is the first few lines of my validator class:</p>
  
  <pre><code>namespace Project\Backend\Service\Form\Job;
  
  use Project\Backend\Service\Validation\AbstractLaravelValidator;
  
  class JobFormValidator extends AbstractLaravelValidator {
  
      // Includes some validation rules
  </code></pre>
  
  <p>This is the abstract validator:</p>
  
  <pre><code>namespace Project\Backend\Service\Validation;
  
  use Illuminate\Validation\Factory;
  
  abstract class AbstractLaravelValidator implements ValidableInterface {
  
      /**
       * Validator
       *
       * @var \Illuminate\Validation\Factory
       */
      protected $validator;
  
      /**
       * Validation data key =&gt; value array
       *
       * @var Array
       */
      protected $data = array();
  
      /**
       * Validation errors
       *
       * @var Array
       */
      protected $errors = array();
  
      /**
       * Validation rules
       *
       * @var Array
       */
      protected $rules = array();
  
      /**
       * Custom validation messages
       *
       * @var Array
       */
      protected $messages = array();
  
      public function __construct(Factory $validator)
      {
          $this-&gt;validator = $validator;
      }
  </code></pre>
  
  <p>This is the code where I bind it all to the app:</p>
  
  <pre><code>namespace Project\Backend\Service\Validation;
  
  use Illuminate\Support\ServiceProvider;
  use Project\Backend\Service\Form\Job\JobFormValidator;
  
  class ValidationServiceProvider extends ServiceProvider {
  
      public function register()
      {
          $app = $this-&gt;app;
  
          $app-&gt;bind('Project\Backend\Service\Form\Job\JobFormValidator', function($app)
          {
              return new JobFormValidator($app['validator']);
          });
      }
  }
  </code></pre>
  
  <p>This is then registered in app/config/app.php:</p>
  
  <pre><code>.....
  'Project\Backend\Service\Validation\ValidationServiceProvider',
  ....
  </code></pre>
  
  <p>Finally these are the first few lines of my controller:</p>
  
  <pre><code>use Project\Backend\Repo\Job\JobInterface;
  use Project\Backend\Service\Form\Job\JobForm;
  
  class JobController extends \BaseController {
  
      protected $jobform;
  
      function __construct(JobInterface $job, JobForm $jobform)
      {
          $this-&gt;job = $job;
          $this-&gt;jobform = $jobform;
      }
  </code></pre>