Laravel 5.6.33中的常规错误:1接近“)”:语法错误“)

I have some problem with Laravel Migrations . I have a many to many relationship between my articles and tags . 'article_tag' Migration :

Schema::create('article_tag', function (Blueprint $table) {
    $table->integer('article_id')->unsigned()->index();
    $table->foreign('article_id')->refrences('id')->on('tags')->onDelete('cascade')->onUpdate('cascade');
    $table->integer('tag_id')->unsigned()->index();
    $table->foreign('tag_id')->refrences('id')->on('articles')->onDelete('cascade')->onUpdate('cascade');
});

'tags' Migration :

Schema::create('tags', function (Blueprint $table) {
    $table->increments('id');
    $table->string('name');
    $table->timestamps();
});

'article Migration :

Schema::create('articles', function (Blueprint $table) {
    $table->increments('id');
    $table->string('title');
    $table->text('body');
    $table->timestamps();
});

My Console Log :

Illuminate\Database\QueryException : SQLSTATE[HY000]: General error: 1 near ")": syntax error (SQL: create table "article_tag" ("article_id" integer not null, "tag_id" integer not null, foreign key("article_id") references "tags"() on delete cascade on update cascade, foreign key("tag_id") references "articles"() on delete cascade on update cascade)

Exception trace:

1 PDOException::("SQLSTATE[HY000]: General error: 1 near ")": syntax error") /home/user/Desktop/blog/vendor/laravel/framework/src/Illuminate/Database/Connection.php:452

2 PDO::prepare("create table "article_tag" ("article_id" integer not null, "tag_id" integer not null, foreign key("article_id") references "tags"() on delete cascade on update cascade, foreign key("tag_id") references "articles"() on delete cascade on update cascade)") /home/user/Desktop/blog/vendor/laravel/framework/src/Illuminate/Database/Connection.php:452

Best , Javad

There is a misspelling in your migration. You are saying that refrences->() but it should be references->()

Schema::create('article_tag', function (Blueprint $table) {
        $table->integer('article_id')->unsigned()->index();
// in here
        $table->foreign('article_id')->refrences('id')->on('tags')->onDelete('cascade')->onUpdate('cascade');
        $table->integer('tag_id')->unsigned()->index();
// and in here too
        $table->foreign('tag_id')->refrences('id')->on('articles')->onDelete('cascade')->onUpdate('cascade');
    });