hasMany() public method
Declares a has-many relation. The declaration is returned in terms of a relational yii\db\ActiveQuery instance through which the related record can be queried and retrieved back. A has-many relation means that there are multiple related records matching the criteria set by this relation, e.g., a customer has many orders. For example, to declare the orders relation for Customer class, we can write the following code in the Customer class: public function getOrders()
{