Laravel 4:执行迁移时出错


Laravel 4: Error execute migrate

我有这个迁移php文件:

<?php
use Illuminate'Database'Schema'Blueprint;
use Illuminate'Database'Migrations'Migration;
class CreateCategoriesTable.php extends Migration {
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('categories', function($table)
        {
            $table->increments('id'); 
            $table->string('name',200); 
            $table->string('description',200); 
            $table->boolean('is_disabled');
            $table->timestamps();
        });
    }
    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('categories');
    }
}

然后我执行php-artisan迁移,得到了这个错误:

致命错误:Illuminate''Filesystem''Filesystem::requireOn():无法打开必需的'WWW_DIRECTORY/app/database/migrations/2013_11_23_154547_create_categories_table.php’

Aynone知道为什么会发生这种事?我正在学习使用Laravel。。

您没有正确地声明您的类。需要删除该.php扩展名。代替

class CreateCategoriesTable.php extends Migration {

使用

class CreateCategoriesTable extends Migration {