【发布时间】:2018-04-24 11:35:42
【问题描述】:
我正在尝试在git repo 之后创建 RethinkDB + Laravel 的演示,但我被卡住了,将迁移我的迁移。当我尝试使用 php artisan migrate 进行迁移时,出现此错误
[Symfony\Component\Debug\Exception\FatalThrowableError]
Type error: Argument 1 passed to Users::{closure}() must be an instance of duxet\Rethinkdb\Schema\Blueprint, instance of Illuminate\Database\Sc
hema\Blueprint given, called in /opt/lampp/htdocs/xyzz-laravel/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php on line 164
我在 repo 中查看了这个问题,但它在 bug 中列出并且没有正确解决。有没有人遇到过这个问题并知道如何修复这个错误?
这是我所做的迁移。
<?php
use Illuminate\Support\Facades\Schema;
use duxet\Rethinkdb\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class Users extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('users',function (Blueprint $table){
$table->increments('id');
$table->string('name');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('users');
}
}
提前致谢:)
【问题讨论】:
标签: php laravel rethinkdb laravel-5.5 laravel-migrations