/**
  * Creates a new LogmanExceptions model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  * @return mixed
  */
 public function actionCreate()
 {
     $model = new LogmanExceptions();
     if ($model->load(Yii::$app->request->post()) && $model->save()) {
         return $this->redirect(['view', 'id' => $model->id]);
     } else {
         return $this->render('create', ['model' => $model]);
     }
 }
 private function logException($tag)
 {
     $data = Yii::$app->request->post('data');
     $ex = new LogmanExceptions();
     $ex->tag = $tag;
     $ex->class = $data['class'];
     $ex->error_group = $data['error_group'];
     $ex->line_number = $data['line_number'];
     $ex->file_name = $data['file_name'];
     $ex->message = $data['message'];
     $ex->stack_trace = $data['stack_trace'];
     $ex->save();
 }