src/Fk.php
public static function migrate()
    {
        foreach (static::$foreignKeys as $foreignKey) {
            Schema::table($foreignKey['table'], function (Blueprint $table) use ($foreignKey) {
                $table->foreign($foreignKey['column'], $foreignKey['key_name'])
                ->references($foreignKey['primary_key'])
                ->on($foreignKey['reference_table'])
                ->onDelete($foreignKey['on_delete'])
                ->onUpdate($foreignKey['on_update']);
            });
        }

        static::$foreignKeys = [];
    }
public static function migrate()
    {
        foreach (static::$foreignKeys as $foreignKey) {
            Schema::table($foreignKey['table'], function (Blueprint $table) use ($foreignKey) {
                $table->foreign($foreignKey['column'], $foreignKey['key_name'])
                ->references($foreignKey['primary_key'])
                ->on($foreignKey['reference_table'])
                ->onDelete($foreignKey['on_delete'])
                ->onUpdate($foreignKey['on_update']);
            });
        }

        static::$foreignKeys = [];
    }
public static function migrate ( ) { foreach ( static :: $ foreignKeys as $ foreignKey ) { Schema :: table ( $ foreignKey [ 'table' ] , function ( Blueprint $ table ) use ( $ foreignKey ) { $ table -> foreign ( $ foreignKey [ 'column' ] , $ foreignKey [ 'key_name' ] ) -> references ( $ foreignKey [ 'primary_key' ] ) -> on ( $ foreignKey [ 'reference_table' ] ) -> onDelete ( $ foreignKey [ 'on_delete' ] ) -> onUpdate ( $ foreignKey [ 'on_update' ] ) ; } ) ; } static :: $ foreignKeys = [ ] ; }
Migrate creation of foreign keys base from the fk calls.

@return void
Migrate creation of foreign keys base from the fk calls .