111
*/
public function actionCreate()
{
Yii::$app->user->identity->accessAdminOnly;
$model = new ClaimType();
if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(['view', 'id' => $model->id]);
} else {
return $this->render('create', ['model' => $model,]);
}
}
/**
* Updates an existing ClaimType model.
* If update is successful, the browser will be redirected to the 'view' page.
*
* @return mixed
*/
public function actionUpdate($id)
{
Yii::$app->user->identity->accessAdminOnly;
$model = $this->findModel($id);
if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(['view', 'id' => $model->id]);
} else {
return $this->render('update', ['model' => $model,]);
}
}