title: Laravel 4 migrations - class not found
body: <p><strong>This question is now solved - I used the below:</strong></p>
  
  <p>And, problem solved thanks to IRC. I was told to run</p>
  
  <pre><code>php composer.phar dump-autoload
  </code></pre>
  
  <p>This fixes the problem for me. It's likely related to my strange Composer setup.</p>
  
  <hr>
  
  <p>I've just started playing with Laravel 4 for a possible future project, having come from Laravel 3. I have started off by creating a new migration, create_blogs_table using artisan:</p>
  
  <pre><code>php artisan migrate:make create_blogs_table --table=blogs --create
  </code></pre>
  
  <p>This generated the basic migration file structure which I then filled out a little more:</p>
  
  <pre><code>&lt;?php
  
  use Illuminate\Database\Migrations\Migration;
  
  class CreateBlogsTable extends Migration
  {
  
      /**
       * Run the migrations.
       *
       * @return void
       */
      public function up()
      {
          Schema::create('blogs', function($table)
          {
              $table-&gt;increments('id');
              $table-&gt;string('title');
              $table-&gt;text('description')-&gt;nullable();
              $table-&gt;integer('user_id')-&gt;unsigned();
              $table-&gt;timestamps();
          });
      }
  
      /**
       * Reverse the migrations.
       *
       * @return void
       */
      public function down()
      {
          Schema::drop('blogs');
      }
  }
  </code></pre>
  
  <p>I now try to run this migration using artisan once again:</p>
  
  <pre><code>php artisan migrate --env=local
  </code></pre>
  
  <p>*note I have a local database connection set up for domains with the .dev extension</p>
  
  <p>Previously this would work just fine (in Laravel 3) but with Illuminate I then receive this error:</p>
  
  <pre><code>PHP Fatal error:  Class 'CreateBlogsTable' not found in /var/www/gamingsite/vendor/illuminate/database/src/Illuminate/Database/Migrations/Migrator.php on line 301
  PHP Stack trace:
  PHP   1. {main}() /var/www/gamingsite/artisan:0
  PHP   2. Symfony\Component\Console\Application-&gt;run() /var/www/gamingsite/artisan:57
  PHP   3. Symfony\Component\Console\Application-&gt;doRun() /var/www/gamingsite/vendor/symfony/console/Symfony/Component/Console/Application.php:106
  PHP   4. Illuminate\Console\Command-&gt;run() /var/www/gamingsite/vendor/symfony/console/Symfony/Component/Console/Application.php:193
  PHP   5. Symfony\Component\Console\Command\Command-&gt;run() /var/www/gamingsite/vendor/illuminate/console/src/Illuminate/Console/Command.php:95
  PHP   6. Illuminate\Console\Command-&gt;execute() /var/www/gamingsite/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:240
  PHP   7. Illuminate\Database\Console\Migrations\MigrateCommand-&gt;fire() /var/www/gamingsite/vendor/illuminate/console/src/Illuminate/Console/Command.php:107
  PHP   8. Illuminate\Database\Migrations\Migrator-&gt;run() /var/www/gamingsite/vendor/illuminate/database/src/Illuminate/Database/Console/Migrations/MigrateCommand.php:69
  PHP   9. Illuminate\Database\Migrations\Migrator-&gt;runMigrationList() /var/www/gamingsite/vendor/illuminate/database/src/Illuminate/Database/Migrations/Migrator.php:75
  PHP  10. Illuminate\Database\Migrations\Migrator-&gt;runUp() /var/www/gamingsite/vendor/illuminate/database/src/Illuminate/Database/Migrations/Migrator.php:106
  PHP  11. Illuminate\Database\Migrations\Migrator-&gt;resolve() /var/www/gamingsite/vendor/illuminate/database/src/Illuminate/Database/Migrations/Migrator.php:125
  PHP Fatal error:  Uncaught exception 'UnexpectedValueException' with message 'The stream or file "/var/www/gamingsite/app/start/../storage/logs/log-2012-12-28.txt" could not be opened: failed to open stream: Permission denied' in /var/www/gamingsite/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:71
  Stack trace:
  #0 /var/www/gamingsite/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php(77): Monolog\Handler\StreamHandler-&gt;write(Array)
  #1 /var/www/gamingsite/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php(37): Monolog\Handler\RotatingFileHandler-&gt;write(Array)
  #2 /var/www/gamingsite/vendor/monolog/monolog/src/Monolog/Logger.php(214): Monolog\Handler\AbstractProcessingHandler-&gt;handle(Array)
  #3 /var/www/gamingsite/vendor/monolog/monolog/src/Monolog/Logger.php(278): Monolog\Logger-&gt;addRecord(400, Object(Symfony\Component\HttpKernel\Exception\FatalErrorException), Array)
  #4 [internal function]: Monolog\Logger-&gt;addError(Object(Symfony\Component\HttpKernel\Exception\FatalErrorExcepti in /var/www/gamingsite/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php on line 71
  PHP Stack trace:
  PHP   1. {main}() /var/www/gamingsite/artisan:0
  PHP   2. Symfony\Component\Console\Application-&gt;run() /var/www/gamingsite/artisan:57
  PHP   3. Symfony\Component\Console\Application-&gt;doRun() /var/www/gamingsite/vendor/symfony/console/Symfony/Component/Console/Application.php:106
  PHP   4. Illuminate\Console\Command-&gt;run() /var/www/gamingsite/vendor/symfony/console/Symfony/Component/Console/Application.php:193
  PHP   5. Symfony\Component\Console\Command\Command-&gt;run() /var/www/gamingsite/vendor/illuminate/console/src/Illuminate/Console/Command.php:95
  PHP   6. Illuminate\Console\Command-&gt;execute() /var/www/gamingsite/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:240
  PHP   7. Illuminate\Database\Console\Migrations\MigrateCommand-&gt;fire() /var/www/gamingsite/vendor/illuminate/console/src/Illuminate/Console/Command.php:107
  PHP   8. Illuminate\Database\Migrations\Migrator-&gt;run() /var/www/gamingsite/vendor/illuminate/database/src/Illuminate/Database/Console/Migrations/MigrateCommand.php:69
  PHP   9. Illuminate\Database\Migrations\Migrator-&gt;runMigrationList() /var/www/gamingsite/vendor/illuminate/database/src/Illuminate/Database/Migrations/Migrator.php:75
  PHP  10. Illuminate\Database\Migrations\Migrator-&gt;runUp() /var/www/gamingsite/vendor/illuminate/database/src/Illuminate/Database/Migrations/Migrator.php:106
  PHP  11. Illuminate\Database\Migrations\Migrator-&gt;resolve() /var/www/gamingsite/vendor/illuminate/database/src/Illuminate/Database/Migrations/Migrator.php:125
  </code></pre>
  
  <p>I've checked and the database/migrations/ folder is certainly being autoloaded. I have no idea what the cause for this problem may be. Having asked on IRC and googled I'm still completely clueless so hopefully somebody can help me out here.</p>
  
  <p>Thanks in advance!</p>