Hello!
How related 2 model as one to Many. My code not work(((
I am try
public function getPages(){
return $this->hasMany(ManagerPages::className(),['category_id'=>'_id']);
}
but it not works.
if i write incorect "category_id" as "category_id2" i do not get error
and i now write
return ManagerPages::findAll(['category_id'=>(string)$this->_id]);
P.S. i use "hasOne" in other model and code works fine))) but with "hasMany" not want.