我正在尝试将oauth2-server-laravel与laravel-mongodb一起使用。使用此命令生成迁移后,php artisan oauth2-server:migrations
我尝试使用php artisan migrate
. 但我得到了这个错误。
[ErrorException]
Missing argument 1 for Illuminate\Database\Schema\Blueprint::primary(),
called in
/home/opu/www/cwc_penguins/app/database/migrations/2015_01_19_203037
_create_oauth_scopes_table.php on line 17 and defined
2015_01_19_203037_create_oauth_scopes_table.php
迁移代码在这里
<?php
use Illuminate\Database\Schema\Blueprint;
use LucaDegasperi\OAuth2Server\Support\Migration;
class CreateOauthScopesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
$this->schema()->create('oauth_scopes', function (Blueprint $table) {
$table->string('id', 40)->primary();
$table->string('description');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
$this->schema()->drop('oauth_scopes');
}
}