Solar_Sql_Model::_hasManyThrough()

protected void Solar_Sql_Model::_hasManyThrough ( string $name , string $through , array $opts = NULL )

Adds a named has-many through relationship.

Parameters

  • (string) $name: The relationship name, which will double as a property when records are fetched from the model.

  • (string) $through: The relationship name that acts as the "through" model (i.e., the mapping model).

  • (array) $opts: Additional options for the relationship.

Returns

  • (void)

Description

Adds a named has-many through relationship.

Note that you can get "has-and-belongs-to-many" using "has-many" with a "through" option ("has-many-through").



Local