查询异常



这是我的迁移代码.....或架构,您可以说

class CreateUsersTable extends Migration
{
/**
 * Run the migrations.
 *
 * @return void
 */
public function up()
{
    Schema::create('users', function (Blueprint $table) {
        $table->increments('id');
      //  $table->string('name');
        $table->string('to');
        $table->string('from');
       // $table->string('email')->unique();
        $table->string('mobile')->nullable();
        $table->rememberToken();
        $table->timestamps();
    });
}

当我在Laravel上运行此错误时,出现了错误:

<?php
 use IlluminateDatabaseSchemaBlueprint;
 use IlluminateDatabaseMigrationsMigration;
class CreateUsersTable extends Migration
{
  public function up()
{
   Schema::create('users', function (Blueprint $table) {
    $table->increments('id');
    $table->string('to');
    $table->string('from');
    $table->string('mobile')->nullable();
    $table->rememberToken();
    $table->timestamps();
  });
}
 public function down()
 {
  Schema::drop('users');
 }
}

尝试使用此代码,还要在Env File和Database.php

中检查与数据库相关的数据库设置

相关内容

  • 没有找到相关文章

最新更新