Total Complexity | 3 |
Total Lines | 13 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
9 | class SettingsController extends Controller |
||
10 | { |
||
11 | public function actionIndex() |
||
12 | { |
||
13 | $model = new SettingsForm(); |
||
14 | |||
15 | if ($model->load(Yii::$app->request->post()) && $model->save()) { |
||
16 | Yii::$app->getSession()->setFlash('success', 'Settings successfully updated!'); |
||
17 | return $this->refresh(); |
||
18 | } |
||
19 | |||
20 | return $this->render('settings', [ |
||
21 | 'model' => $model, |
||
22 | ]); |
||
24 | } |