ErrorException未定义索引:2017_05_14_071616_create_users_table

时间:2017-05-23 19:14:20

标签: php phpmyadmin laravel-5.4

我花了很多时间来解决这个错误,但它不会,我只是删除迁移和重新创建,很多时间掉落phpmyadmin数据库行,作曲家自动加载但我无法解决

当我尝试迁移时:刷新或回滚发生此错误

  

ErrorException未定义索引:2017_05_14_071616_create_users_table

代码如下( create_users_table.php

    <?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateUsersTable extends Migration
{

    public function up()
    {
        Schema::create('users', function (Blueprint $table) {
           Schema::drop('users');
            $table->increments('id');
            $table->integer('role_id')->unsigned();
            $table->string('name');
            $table->string('email',50)->unique();
            $table->string('username');
            $table->string('password');
            $table->boolean('active');
            $table->rememberToken();
            $table->timestamps();
        });
    }


    public function down()
    {
        Schema::drop('users');
    }
}

0 个答案:

没有答案