reviewテーブルにuser_idとproduct_idを挿入してテーブルデータを作成したいのですが
上記のエラーが出ました。原因がわからないので、教えていただければ助かります。
初心者なので記述等、間違いがあればご指摘頂お願いします。
reviews_tabule.php
public function up() { Schema::create('reviews', function (Blueprint $table) { $table->increments('review_id'); $table->integer('user_id')->unsigned()->index(); $table->datetime('review_date'); $table->integer('product_id')->unsigned()->index(); $table->text('review_comment'); $table->timestamps(); $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');; $table->foreign('product_id')->references('id')->on('products')->onDelete('cascade');; }); }
回答1件
あなたの回答
tips
プレビュー