TheStoryCoder TheStoryCoder - 1 year ago 95
PHP Question

Yii2: What is the relation name?

For the ActiveRecord, what is "the name of the relation" that is to be used in eg.

- where is that defined?

The documentation now includes an example - though it doesn't show exactly how the camel case name is converted - as the answer to this question does.

Answer Source

If you have got relation set like:

public function getRelationName()

Relation name is relationName.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download