title: Database doesn't exist with laravel
body: <p>I don't know why I am getting this error. Is there something wrong with my database configuration? I am using laravel migration for the database and a vagrant box that came with a slightly different configuration. I figure this must be the reason but I can't figure it out. If anyone could help I would be greatful. Thank you.: </p>
  
  <pre><code>SQLSTATE[42S02]: Base table or view not found: 1146 Table 'database.users' doesn't exist (SQL:      
  select * from `users`) (Bindings: array ( ))
  </code></pre>
  
  <p>2013_07_02_170745_create_users_table file:</p>
  
  <p>
  
  <pre><code>use Illuminate\Database\Migrations\Migration;
  
  class CreateUsersTable extends Migration {
  
      public function up()
  {
      Schema::create('users', function($table)
      {
          $table-&gt;increments('id');
          $table-&gt;string('email')-&gt;unique();
          $table-&gt;string('name');
          $table-&gt;timestamps();
      });
  }
  
  public function down()
  {
      Schema::drop('users');
  }
  
  }
  </code></pre>
  
  <p>User.php file: </p>
  
  <p>
  
  <pre><code>use Illuminate\Auth\UserInterface;
  use Illuminate\Auth\Reminders\RemindableInterface;
  
  class User extends Eloquent implements UserInterface, RemindableInterface {
  
      /**
       * The database table used by the model.
       *
       * @var string
       */
      protected $table = 'users';
  
      /**
       * The attributes excluded from the model's JSON form.
       *
       * @var array
       */
      protected $hidden = array('password');
  
      /**
       * Get the unique identifier for the user.
       *
       * @return mixed
       */
      public function getAuthIdentifier()
      {
          return $this-&gt;getKey();
      }
  
      /**
       * Get the password for the user.
       *
       * @return string
       */
      public function getAuthPassword()
      {
          return $this-&gt;password;
      }
  
      /**
       * Get the e-mail address where password reminders are sent.
       *
       * @return string
       */
      public function getReminderEmail()
      {
          return $this-&gt;email;
      }
  
  }
  </code></pre>
  
  <p>database.php</p>
  
  <p>
  
  <pre><code>return array(
  
      /*
      |--------------------------------------------------------------------------
      | PDO Fetch Style
      |--------------------------------------------------------------------------
      |
      | By default, database results will be returned as instances of the PHP
      | stdClass object; however, you may desire to retrieve records in an
      | array format for simplicity. Here you can tweak the fetch style.
      |
      */
  
      'fetch' =&gt; PDO::FETCH_CLASS,
  
      /*
      |--------------------------------------------------------------------------
      | Default Database Connection Name
      |--------------------------------------------------------------------------
      |
      | Here you may specify which of the database connections below you wish
      | to use as your default connection for all database work. Of course
      | you may use many connections at once using the Database library.
      |
      */
  
      'default' =&gt; 'mysql',
  
      /*
      |--------------------------------------------------------------------------
      | Database Connections
      |--------------------------------------------------------------------------
      |
      | Here are each of the database connections setup for your application.
      | Of course, examples of configuring each database platform that is
      | supported by Laravel is shown below to make development simple.
      |
      |
      | All database work in Laravel is done through the PHP PDO facilities
      | so make sure you have the driver for your particular database of
      | choice installed on your machine before you begin development.
      |
      */
  
      'connections' =&gt; array(
  
          'sqlite' =&gt; array(
              'driver'   =&gt; 'sqlite',
              'database' =&gt; __DIR__.'/../database/production.sqlite',
              'prefix'   =&gt; '',
          ),
  
          'mysql' =&gt; array(
              'driver'    =&gt; 'mysql',
              'host'      =&gt; 'localhost',
              'database'  =&gt; 'database',
              'username'  =&gt; 'root',
              'password'  =&gt; 'root',
              'charset'   =&gt; 'utf8',
              'collation' =&gt; 'utf8_unicode_ci',
              'prefix'    =&gt; '',
          ),
  
          'pgsql' =&gt; array(
              'driver'   =&gt; 'pgsql',
              'host'     =&gt; 'localhost',
              'database' =&gt; 'database',
              'username' =&gt; 'root',
              'password' =&gt; '',
              'charset'  =&gt; 'utf8',
              'prefix'   =&gt; '',
              'schema'   =&gt; 'public',
          ),
  
          'sqlsrv' =&gt; array(
              'driver'   =&gt; 'sqlsrv',
              'host'     =&gt; 'localhost',
              'database' =&gt; 'database',
              'username' =&gt; 'root',
              'password' =&gt; '',
              'prefix'   =&gt; '',
          ),
  
      ),
  
      /*
      |--------------------------------------------------------------------------
      | Migration Repository Table
      |--------------------------------------------------------------------------
      |
      | This table keeps track of all the migrations that have already run for
      | your application. Using this information, we can determine which of
      | the migrations on disk have not actually be run in the databases.
      |
      */
  
      'migrations' =&gt; 'migrations',
  
      /*
      |--------------------------------------------------------------------------
      | Redis Databases
      |--------------------------------------------------------------------------
      |
      | Redis is an open source, fast, and advanced key-value store that also
      | provides a richer set of commands than a typical key-value systems
      | such as APC or Memcached. Laravel makes it easy to dig right in.
      |
      */
  
      'redis' =&gt; array(
  
          'cluster' =&gt; true,
  
          'default' =&gt; array(
              'host'     =&gt; '127.0.0.1',
              'port'     =&gt; 6379,
              'database' =&gt; 0,
          ),
  
      ),
  
  );
  </code></pre>
  
  <p>routes.php </p>
  
  <p>
  
  <pre><code>/*
  |--------------------------------------------------------------------------
  | Application Routes
  |--------------------------------------------------------------------------
  |
  | Here is where you can register all of the routes for an application.
  | It's a breeze. Simply tell Laravel the URIs it should respond to
  | and give it the Closure to execute when that URI is requested.
  |
  */
  
  Route::get('/', function()
  {
      return View::make('hello');
  });
  
  Route::get('/users', function()
  {
      $users = User::all();
      return View::make('users')-&gt;with('users' , $users);
  });
  </code></pre>