database/migrations/2016_07_07_003938_add_relationships_to_orders_products.php
/**
     * Reverse the migrations.
     *
     * @return void
     */
Reverse the migrations.
@return void
Reverse the migrations . @return void
public function down()
    {
        Schema::table('orders_products', function(Blueprint $table)
        {
            $table->dropForeign('orders_products_product_id_foreign');
            $table->dropForeign('orders_products_order_id_foreign');
            });
            Schema::table('orders_products', function(Blueprint $table)
            {
            $table->dropIndex('orders_products_product_id_foreign');
            $table->dropIndex('orders_products_order_id_foreign');
            });
            Schema::table('orders_products', function(Blueprint $table)
            {
            $table->integer('product_id')->change();
            $table->integer('order_id')->change();
       });
    }
public function down ( ) { Schema :: table ( 'orders_products' , function ( Blueprint $ table ) { $ table -> dropForeign ( 'orders_products_product_id_foreign' ) ; $ table -> dropForeign ( 'orders_products_order_id_foreign' ) ; } ) ; Schema :: table ( 'orders_products' , function ( Blueprint $ table ) { $ table -> dropIndex ( 'orders_products_product_id_foreign' ) ; $ table -> dropIndex ( 'orders_products_order_id_foreign' ) ; } ) ; Schema :: table ( 'orders_products' , function ( Blueprint $ table ) { $ table -> integer ( 'product_id' ) -> change ( ) ; $ table -> integer ( 'order_id' ) -> change ( ) ; } ) ; }
Reverse the migrations.
Reverse the migrations .