I am sure I am just doing something wrong but can for the life of me not find it. This is my action:
public function actionSettings()
{
$model = $this->findModel(1);
if ($model->load(Yii::$app->request->post()) && $model->save())
{
return $this->render('settings', ['model' => $model,]);
}
else
{
return $this->render('settings', ['model' => $model,]);
}
}
Yes I am hardcoding the $id value, but it all runs fine, but nothing gets updated. It is somehow working because it gets data from db and displays it in my view, but changing and submitting makes no change to the db.