increments('id'); $table->integer('product_id')->unsigned()->nullable(); $table->integer('contact_id')->unsigned()->nullable(); $table->integer('company_id')->nullable(); $table->text('comment')->nullable(); $table->timestamps(); $table->softDeletes(); }); Schema::table('testimonials', function (Blueprint $table) { $table->foreign('product_id')->references('id')->on('products'); $table->foreign('contact_id')->references('id')->on('contacts'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('testimonials'); } }