How I drop multiple foreign key and primary keys in migration file.
Bellow is my migration file code.
Migration File
public function up()
{
Schema::create('role_user', function(Blueprint $table){
$table->integer('role_id')->unsigned();
$table->integer('user_id')->unsigned();
$table->foreign('role_id')
->references('id')
->on('roles')
->onDelete('cascade');
$table->foreign('user_id')
->references('id')
->on('users')
->onDelete('cascade');
$table->primary(['role_id', 'user_id']);
});
}
public function down()
{
Schema::drop('role_user');
//how drop foreign and primary key here ?
}