src/Neutrino/Database/Schema/Blueprint.php
protected function addForeign($columns, $name = null)
    {
        $columns = (array)$columns;

        // If no name was specified for this index, we will create one using a basic
        // convention of the table name, followed by the columns, followed by an
        // index type, such as primary or index, which makes the index unique.

        return $this->references[] = new Definition(['name' => $name, 'columns' => $columns, 'type' => 'foreign']);
    }
protected function addForeign($columns, $name = null)
    {
        $columns = (array)$columns;

        // If no name was specified for this index, we will create one using a basic
        // convention of the table name, followed by the columns, followed by an
        // index type, such as primary or index, which makes the index unique.

        return $this->references[] = new Definition(['name' => $name, 'columns' => $columns, 'type' => 'foreign']);
    }
Add a new command to the blueprint.

@param  string|string[] $columns
@param  string|null     $name

@return \Neutrino\Database\Schema\Definition