I have create action on update and view in controller, but this action does not change on action column in index page
public function actionLeadView($id){
$id = $_GET['id'];
$model = Leads::findOne($id);
retu $this->render('viewlead', [
'model' => $model,
]);
}
public function actionLeadUpdate($id){
$id = $_GET['id'];
$model = Leads::findOne($id);
date_default_timezone_set("Asia/Kolkata");
$date = date('Y/m/d H-i-sa');
if ($model->load(Yii::$app->request->post())) {
$model->modified = $date;
if($model->validate()){
$model->save();
retu $this->redirect(['viewlead', 'id' => $model->id]);
}else {
retu $this->render('updatelead', [
'model' => $model,
]);
}
}
else { retu $this->render('updatelead', [ 'model' => $model, ]); } }
