hasOne() public method
Declares a has-one 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-one relation means that there is at most one related record matching the criteria set by this relation, e.g., a customer has one country. For example, to declare the country relation for Customer class, we can write the following code in the Customer class: public function getCountry()
{