public link ( string $name, static $model, array $extraColumns = [] ) | ||
$name | string | the case sensitive name of the relationship, e.g. `orders` for a relation defined via `getOrders()` method. |
$model | static | the record to be linked with the current one. |
$extraColumns | array | additional column values to be saved into the junction table. This parameter is only meaningful for a relationship involving a junction table (i.e., a relation set with [[ActiveQueryInterface::via()]]). |