Added foreign key support to schema builder for MySQL, Postgres, and SQL Server.
Signed-off-by: Taylor Otwell <taylorotwell@gmail.com>
This commit is contained in:
@@ -108,6 +108,17 @@ class Table {
|
||||
return $this->key(__FUNCTION__, $columns, $name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a foreign key constraint to the table.
|
||||
*
|
||||
* @param string|array $columns
|
||||
* @param string $name
|
||||
*/
|
||||
public function foreign($columns, $name = null)
|
||||
{
|
||||
return $this->key(__FUNCTION__, $columns, $name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a command for creating any index.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user