title: Laravel, why can't I run a successful create table migration with a slightly different spelling of table name?
body: <p>I'm attempting to run a migration in Laravel 4 but I keep getting the following error:</p>
  
  <pre><code> [Illuminate\Database\QueryException]  SQLSTATE[42S02]: Base table or view not found: 1146 Table 'ramen.categories  ' doesn't exist (SQL: create table `categories` (`id` int unsigned not null  auto_increment primary key) default character set utf8 collate utf8_unicode_ci)
  </code></pre>
  
  <p>Oddly, if I change the table name from "categories" to "categoriez" the migration runs successfully.</p>
  
  <p>This is the command I used to create the migration:</p>
  
  <pre><code>php artisan migrate:make create_categories_table --table=categories --create=categories
  </code></pre>
  
  <p>And this is the actual migration file:</p>
  
  <p><pre><code></p>
  
  <p>use Illuminate\Database\Schema\Blueprint;
  use Illuminate\Database\Migrations\Migration;</p>
  
  <p>class CreateCategoriesTable extends Migration {</p>
  
  <pre><code>/**
   * Run the migrations.
   *
   * @return void
   */
  public function up()
  {
      Schema::create('categories', function(Blueprint $table)
      {
          $table-&gt;increments('id');
          $table-&gt;timestamps();
  
          $table-&gt;integer('parent')-&gt;unsigned();
          $table-&gt;string('category_type');
          $table-&gt;string('name');
          $table-&gt;string('type');
  
          $table-&gt;index('type');
          $table-&gt;index('parent');
          $table-&gt;index('name');
      });
  }
  
  /**
   * Reverse the migrations.
   *
   * @return void
   */
  public function down()
  {
      Schema::drop('categories');
  }
  </code></pre>
  
  <p>}</p>
  
  <p></pre></code></p>
  
  <p>Again, I get the error if I run this migration but if I simply change "categories" to "categoriez" the migration runs successfully.</p>
  
  <p>I had a categroies table set up previously which I hadn't set up via a migration. I've dropped this table. I also had a Categories model file which I've deleted. I've dropped all database tables and re-run all migrations and tried running <code>composer dump-autoload</code> (though I'm not sure that would have anything to do with this issue).</p>
  
  <p>Why am I getting this "table not found" error when I attempt to create the categories table?</p>
  
  <p>I've checked this thread which is similar to my problem but has not helped me solve this error: <a href="https://stackoverflow.com/questions/19265202/laravel-4-migrate-base-table-not-found">Laravel 4 migrate base table not found</a></p>