Install nodejs components in application.ext.yii-node-socket.lib.js.server:
$> npm install
if($reminder->load(Yii::$app->request->post())){
$reminder->getReminder($zakaz);
if($reminder->validate() && $reminder->save()){
Yii::$app->session->setFlash('success', 'Напоминание было созана');
} else {
Yii::$app->session->setFlash('error', 'Извините. Напоминание не было создана');
}
return $this->render('view' , [
'model' => $this->findModel($id),
'notification' => $notification,
'user_name' => $user_name,
'shipping' => $shipping,
'file' => $file,
'reminder' => $reminder,
]);
}
$reminder = new Notification();
public function getReminder($id)
{
$this->id_user = 5;
$this->name = 'Создана напоминание';
$this->id_zakaz = $id;
$this->category = 4;
$this->active = true;
}