I have schedules table which contain student_id and class_id as it's foreign key. I know I can use syntax $table->primary(['student_id', 'class_id']) to prevent same foreign key to pair more than one time in a table, but the problem is my schedules table also has primary key called id, so I can't assign foreign key as primary (will get multiple primary key error). Is there any better approach to solve my problem (make foreign key as primary so they'll never pair more than one time)?
Thanks..