public viaTable ( string $tableName, array $link, callable $callable = null ) | ||
$tableName | string | the name of the junction table. |
$link | array | the link between the junction table and the table associated with [[primaryModel]]. The keys of the array represent the columns in the junction table, and the values represent the columns in the [[primaryModel]] table. |
$callable | callable | a PHP callback for customizing the relation associated with the junction table. Its signature should be `function($query)`, where `$query` is the query to be customized. |