【发布时间】:2015-08-20 12:24:38
【问题描述】:
当我输入控制台时 - php artisan make:migration create_website_table --create=website
比创建文件,我没有编辑任何东西并运行命令php artisan migrate
现在我想回滚它,它说
[Symfony\Component\Debug\Exception\FatalErrorException]
找不到类“CreateWebsiteTable”
我的迁移网站类的代码
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateWebsiteTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('website', function (Blueprint $table) {
$table->increments('id');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('website');
}
}
也许有一些命名空间?
【问题讨论】:
-
尝试从 Laravel 项目的根目录运行“composer dump-autoload”
标签: php laravel laravel-5.1