id(); $table->string('name', 100); $table->string('key', 100); $table->timestamps(); }); Schema::create('producto_caracteristica', function (Blueprint $table) { $table->unsignedBigInteger('producto_id'); $table->unsignedBigInteger('caracteristica_id'); $table->primary(['producto_id','caracteristica_id']); $table->foreign('producto_id')->references('id')->on('productos'); $table->foreign('caracteristica_id')->references('id')->on('caracteristicas'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('producto_caracteristica'); Schema::dropIfExists('caracteristicas'); } };