src/TableBlueprint.php
public function addForeignKey(
        string $column,
        string $foreignTable,
        string $foreignKey,
        array $options = []
    ): self {
        return $this->addOperation(
            new Operation\ForeignKey\Add(
                $this->table,
                $column,
                $foreignTable,
                $foreignKey,
                $options
            )
        );
    }
public function addForeignKey(
        string $column,
        string $foreignTable,
        string $foreignKey,
        array $options = []
    ): self {
        return $this->addOperation(
            new Operation\ForeignKey\Add(
                $this->table,
                $column,
                $foreignTable,
                $foreignKey,
                $options
            )
        );
    }
Example:
$table->addForeignKey('user_id', 'users', 'id', ['delete' => 'CASCADE']);

@param string $column
@param string $foreignTable Database isolation prefix will be automatically added.
@param string $foreignKey
@param array  $options
@return TableBlueprint