id(); $table->text('body'); $table->unsignedBigInteger('customer_id'); $table->text('answer')->default(null)->nullable(); $table->unsignedBigInteger('product_id'); $table->tinyInteger('status')->default(0); $table->timestamps(); $table->foreign('product_id')->on('products') ->references('id')->onDelete('cascade'); $table->foreign('customer_id')->on('customers') ->references('id')->onDelete('cascade'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('questions'); } };