How to set scenario in object created from Join Query in Yii2
My query is
$model = Answers::find()
->joinWith('question')
->where(['request_id' => $Request->id])->all();
I am getting data in model object. Now when i try to set scenario to this object
$model->scenario = 'get_answer';
it is giving error "PHP Warning – yii\base\ErrorException
Attempt to assign property of non-object"
How to set scenario to this object.