Answer the question
In order to leave comments, you need to log in
How to call the function of the class from which we take data when calling hasOne/hasMany?
There is a Category class that has a getRequiredQuery method
public function getRequiredQuery() {
return static::find()->where(['status' => 1])->orderBy(['id' => SORT_DESC]);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question