title: Laravel: Issues with ServiceProvider | Error: Class '...ServiceProvider' not found in bootstrap/compiled.php on line #
body: <p>I have been working on the same app for a little bit now, and I am moving it over to Laravel. This is not only my first experience with Laravel, but my first time using a PHP framework. It is awesome so far.</p>
  
  <p>I have run into a problem in my testing, I am getting an error: <code>Error Output: PHP Fatal error:  Class 'my-app/Repositories/RepositoryServiceProvider' not found in /var/www/laravel/bootstrap/compiled.php on line 4259</code></p>
  
  <p>I am wondering what causes this error and how I can fix it . It gives me the direct line that is problematic. But I have no idea how to solve this issue.</p>
  
  <p>I have tried a number of solutions including</p>
  
  <pre><code>composer install
  composer update
  composer dump-autoload
  </code></pre>
  
  <p>and others as well.</p>
  
  <p>I have also attempted deleting the <code>compiled.php</code> file all together, but then it trips the same error on a different file. What is it causing this error, and how can I go about debugging it?</p>
  
  <p>This is my <strong>RepositoryServiceProvider.php</strong> file that is being problematic:</p>
  
  <pre><code>&lt;?php namespace my-app\Repositories;
  
  use Invite;
  use Illuminate\Support\ServiceProvider;
  use my-app\Repositories\Invite\EloquentInviteRepository;
  
  class RepositoryServiceProvider extends ServiceProvider {
  
   /**
     * Register the Invite Repository
     *
     * @return void
     */
    public function registerInviteRepository()
    {
      $this-&gt;app-&gt;bind('my-app\Repositories\Invite\InviteRepository', function($app)
    {
        return new EloquentInviteRepository( new Invite );
    });
  }
  </code></pre>
  
  <p><strong>composer.json</strong></p>
  
  <pre><code>{
  "name": "laravel/laravel",
  "description": "The Laravel Framework.",
  "keywords": ["framework", "laravel"],
  "license": "MIT",
  "require": {
      "laravel/framework": "4.2.*",
      "way/generators": "dev-master"
  },
  "autoload": {
      "classmap": [
          "app/commands",
          "app/controllers",
          "app/models",
          "app/database/migrations",
          "app/database/seeds",
          "app/tests/TestCase.php"
      ]
  },
  "scripts": {
      "post-install-cmd": [
          "php artisan clear-compiled",
          "php artisan optimize"
      ],
      "post-update-cmd": [
          "php artisan clear-compiled",
          "php artisan optimize"
      ],
      "post-create-project-cmd": [
          "php artisan key:generate"
      ]
  },
  "config": {
      "preferred-install": "dist"
  },
  "minimum-stability": "stable"
  }
  </code></pre>
  
  <p>This is the specific line in <strong>compiled.php</strong> that is giving the issue:</p>
  
  <pre><code>{
      return new $provider($app);
  }
  </code></pre>
  
  <p>You guys have been a huge resource in the past.</p>
  
  <p>I've experienced almost 24 hours of coding downtime because of this probably simple problem, and I've restored and rebuilt twice, only getting back to this error.</p>
  
  <p>Thanks for help in advance!!</p>