unsignedBigInteger('professor_id'); $table->unsignedBigInteger('section_id'); $table->unsignedInteger('percent')->nullable(); $table->string('schedule')->nullable(); $table->float('eval')->nullable(); $table->foreign('professor_id')->references('id')->on('professors'); $table->foreign('section_id')->references('id')->on('sections'); $table->unique(['professor_id', 'section_id']); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('professor_section'); } }