Public constructor. Initialises the relation.
public __construct ( |
||
$parentModel | The data model we are attached to | |
$foreignModelName | string | The name of the foreign key's model in the format "modelName@com_something" |
$localKey | string | The local table key for this relation |
$foreignKey | string | The foreign key for this relation |
$pivotTable | string | For many-to-many relations, the pivot (glue) table |
$pivotLocalKey | string | For many-to-many relations, the pivot table's column storing the local key |
$pivotForeignKey | string | For many-to-many relations, the pivot table's column storing the foreign key |