title: Fzaninotto Faker Install package
body: <p>Can you help me with this error in laravel? I ran <code>php artisan db:seed --class=UserTableSeeder</code> and got: </p>
  
  <p><strong>PHP Fatal error:</strong> </p>
  
  <blockquote>
    <p>Class <code>'Faker\Factory'</code> not found in /Users/I/Laravel/authapp/app/database/seeds 
           /UserTableSeeder.php on line 7</p>
  </blockquote>
  
  <pre><code>{
  "error":{
      "type":"Symfony\\Component\\Debug\\Exception \\FatalErrorException",
      "message":"Class 'Faker\\Factory' not found",
      "file":"\/Users /I\/Laravel\/authapp\/app\/database\/seeds\/UserTableSeeder.php",
      "line":7
  }
  }
  </code></pre>
  
  <p>My UserTableSeeder.php</p>
  
  <pre><code>&lt;?php
  class UserTableSeeder extends Seeder 
  {
  
      public function run()  
      {  
  
          $faker = Faker\Factory::create();
  
          User::truncate();
  
          foreach(range(1,30) as $index)  
          {  
              User::create([  
                  'username' =&gt; str_replace('.', '_', $faker-&gt;unique()-&gt;userName),  
                  'email' =&gt; $faker-&gt;email,  
                  'password' =&gt; 'password', 
              ]);  
          }
      }
  }  
  </code></pre>
  
  <p>My composer.json</p>
  
  <pre><code>{
      "name": "laravel/laravel",
      "description": "The Laravel Framework.",
      "keywords": ["framework", "laravel"],
      "license": "MIT",
      "require": {
          "laravel/framework": "4.2.*",
           "fzaninotto/faker": "1.3.*@dev"
      },
      "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",
      "require-dev": {
      "fzaninotto/faker": "1.3.*@dev"
    },
  
  }
  </code></pre>
  
  <p>After adding the comma, I still get the same error and If I try to include it using autoload from github it also does not work. Where could I look for the error?</p>
  
  <p>I still get the same error. I am scared that it is not loading the Fzniotto Faker Package. What can I do? If I try to include the package by downlaoding it, I get </p>
  
  <pre><code>PHP Warning:  Uncaught exception 'ErrorException' with message 'require_once(../../../vendor/Faker/autoload.php): failed to open stream: No such file or directory' in /Users/stefanieness/Laravel/authapp/app/database/seeds/UserTableSeeder.php:6
  Stack trace:
  #0 /Users/stefanieness/Laravel/authapp/app/database/seeds/UserTableSeeder.php(6): Illuminate\Exception\Handler-&gt;handleError(2, 'require_once(.....', '/Users/stefanie...', 6, Array)
  #1 /Users/stefanieness/Laravel/authapp/app/database/seeds/UserTableSeeder.php(6): UserTableSeeder::run()
  #2 /Users/stefanieness/Laravel/authapp/vendor/laravel/framework/src/Illuminate/Database/Console/SeedCommand.php(57): UserTableSeeder-&gt;run()
  #3 /Users/stefanieness/Laravel/authapp/vendor/laravel/framework/src/Illuminate/Console/Command.php(112): Illuminate\Database\Console\SeedCommand-&gt;fire()
  #4 /Users/stefanieness/Laravel/authapp/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(252): Illuminate\Console\Command-&gt;execute(Object(Symfony\Component\Console\Input\ArgvInput), O in /Users/stefanieness/Laravel/authapp/app/database/seeds/UserTableSeeder.php on line 6
  PHP Fatal error:  UserTableSeeder::run(): Failed opening required '../../../vendor/Faker/autoload.php' (include_path='/Users/stefanieness/Laravel/authapp/vendor/phpseclib/phpseclib/phpseclib:.:') in /Users/stefanieness/Laravel/authapp/app/database/seeds/UserTableSeeder.php on line 6
  {"error":{"type":"Symfony\\Component\\Debug\\Exception\\FatalErrorException","message":"UserTableSeeder::run(): Failed opening required '..\/..\/..\/vendor\/Faker\/autoload.php' (include_path='\/Users\/stefanieness\/Laravel\/authapp\/vendor\/phpseclib\/phpseclib\/phpseclib:.:')","file":"\/Users\/stefanieness\/Laravel\/authapp\/app\/database\/seeds\/UserTableSeeder.php","line":6}}SEICCN-3:authapp stefanieness$ 
  </code></pre>