A TableIndex can be created directly from a Blueprint or from a existing Column. The TableIndex includes methods for further configuring the index which is required when defining foreign keys.
references
Set the referencing column for a foreign key relationship. For example, id for a country_id column.
Argument
Type
Required
Default
Description
columns
any
true
​
A column or array of columns that represents the foreign key reference.