Ziggi
(Ziggi)
1
Well,
I have a model "Users" of activeRecord type (made with gii).
I do:
$user = app\models\Users::find($id);
$user->delete();
and I get the error:
"delete method was not found within class yii\db\ActiveQuery"
Well - what is the right way to delete records using activeRecord models?
I will appreciate prompt feedback 
nakovn
(Lequocnam2010)
2
$user = app\models\Users::findOne($id);
or:
$user = app\models\Users::find()->where(['id' => $id])->one();