public function up()
    {
        Schema::table('charges', function (Blueprint $table) {
            // Linking
            $table->integer('plan_id')->unsigned()->nullable();
            $table->foreign('plan_id')->references('id')->on('plans');
        });

        Schema::table('shops', function (Blueprint $table) {
            // Linking
            $table->integer('plan_id')->unsigned()->nullable();
            $table->foreign('plan_id')->references('id')->on('plans');
        });
    }
public function up()
    {
        Schema::table('charges', function (Blueprint $table) {
            
            $table->integer('plan_id')->unsigned()->nullable();
            $table->foreign('plan_id')->references('id')->on('plans');
        });

        Schema::table('shops', function (Blueprint $table) {
            
            $table->integer('plan_id')->unsigned()->nullable();
            $table->foreign('plan_id')->references('id')->on('plans');
        });
    }
public function up ( ) { Schema :: table ( 'charges' , function ( Blueprint $ table ) { // Linking $ table -> integer ( 'plan_id' ) -> unsigned ( ) -> nullable ( ) ; $ table -> foreign ( 'plan_id' ) -> references ( 'id' ) -> on ( 'plans' ) ; } ) ; Schema :: table ( 'shops' , function ( Blueprint $ table ) { // Linking $ table -> integer ( 'plan_id' ) -> unsigned ( ) -> nullable ( ) ; $ table -> foreign ( 'plan_id' ) -> references ( 'id' ) -> on ( 'plans' ) ; } ) ; }
Run the migrations.

@return void
Run the migrations .