title: Class not found with Laravel 3 and Composer
body: <p>I am attempting to use the <code>php-resque</code> composer package via <code>artisan</code>. I believe Laravel is v3.2.7. When running the command <code>php artisan queue</code> I get the error:</p>
  
  <p><strong>Error</strong></p>
  
  <pre><code>PHP Fatal error:  Class 'Resque' not found in /var/www/dev/application/tasks/queue.php on line 20
  
  Fatal error: Class 'Resque' not found in /var/www/dev/application/tasks/queue.php on line 20
  </code></pre>
  
  <p>What seems to be the problem here? The php-resque package appears to have been installed to the <code>vendor</code> directory...</p>
  
  <p><strong>PHP</strong>
  <em>(queue.php)</em></p>
  
  <pre><code>class Queue_Task
  {
      public function run()
      {
  
          // Autoload composer vendors.
          require path('composer').DS.'autoload.php';
  
          // You can pass arguments into the worker as payload
          $args = array('name' =&gt; 'John Smith');
          Resque::enqueue('testqueue', 'ExampleWorker', $args);
  
          echo "Resque job queued.\n";
          return;
      }
  }
  </code></pre>
  
  <hr>
  
  <p><strong>public/index.php</strong></p>
  
  <pre><code>// --------------------------------------------------------------
  // Tick... Tock... Tick... Tock...
  // --------------------------------------------------------------
  define('LARAVEL_START', microtime(true));
  
  // --------------------------------------------------------------
  // Indicate that the request is from the web.
  // --------------------------------------------------------------
  $web = true;
  
  // --------------------------------------------------------------
  // Set the core Laravel path constants.
  // --------------------------------------------------------------
  require '../paths.php';
  
  // --------------------------------------------------------------
  // Autoload composer vendors.
  // --------------------------------------------------------------
  require path('composer').'autoload.php';
  
  // --------------------------------------------------------------
  // Unset the temporary web variable.
  // --------------------------------------------------------------
  unset($web);
  
  // --------------------------------------------------------------
  // Launch Laravel.
  // --------------------------------------------------------------
  require path('sys').'laravel.php';
  
  // --------------------------------------------------------------
  // Autoload composer vendors.
  // --------------------------------------------------------------
  require path('composer').DS.'autoload.php';
  </code></pre>
  
  <p><strong>paths.php</strong>
  <em>snippet</em></p>
  
  <pre><code>// --------------------------------------------------------------
  // The path to the composer vendors directory.
  // --------------------------------------------------------------
  $paths['composer'] = 'vendor';
  </code></pre>