add company
This commit is contained in:
@ -68,7 +68,9 @@ class StatusController extends Controller
|
||||
$model = new Status();
|
||||
|
||||
if ($model->load(Yii::$app->request->post()) && $model->save()) {
|
||||
return $this->redirect(['view', 'id' => $model->id]);
|
||||
Yii::$app->session->addFlash('success', 'Статус добавлен');
|
||||
|
||||
return $this->redirect(['index']);
|
||||
}
|
||||
|
||||
return $this->render('create', [
|
||||
@ -88,7 +90,8 @@ class StatusController extends Controller
|
||||
$model = $this->findModel($id);
|
||||
|
||||
if ($model->load(Yii::$app->request->post()) && $model->save()) {
|
||||
return $this->redirect(['view', 'id' => $model->id]);
|
||||
Yii::$app->session->addFlash('success', 'Статус обновлен');
|
||||
return $this->redirect(['index']);
|
||||
}
|
||||
$model->use = ArrayHelper::getColumn(
|
||||
\common\models\UseStatus::find()->where(['status_id' => $model->id])->asArray()->all(),
|
||||
|
Reference in New Issue
Block a user