public function actionDatabase() { $model = new DevSettingDatabase(); if (isset($_POST['DevSettingDatabase'])) { $model->attributes = $_POST['DevSettingDatabase']; $model->save(); $this->flash('Database Setting Updated!'); } $this->renderForm('DevSettingDatabase', $model); }
public function actionDatabase() { $model = new DevSettingDatabase(); $posted = false; if (isset($_POST['DevSettingDatabase'])) { $model->attributes = $_POST['DevSettingDatabase']; if ($model->save()) { $posted = true; $this->flash('Database Setting Updated!'); } } $this->renderForm('DevSettingDatabase', $model, ['posted' => $posted]); }