/**
  * Creates a new LogmanRequests model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  * @return mixed
  */
 public function actionCreate()
 {
     $model = new LogmanRequests();
     if ($model->load(Yii::$app->request->post()) && $model->save()) {
         return $this->redirect(['view', 'id' => $model->id]);
     } else {
         return $this->render('create', ['model' => $model]);
     }
 }
 public function actionLog($id = null)
 {
     $request = new LogmanRequests();
     foreach (Yii::$app->request->post() as $id => $data) {
         if ($id != 'data' && $id != 'source') {
             $request->{$id} = $data;
         }
     }
     $request->save();
     $tag = Yii::$app->request->post('tag');
     switch (Yii::$app->request->post('source')) {
         case 0:
             $this->logTrace($tag);
             break;
         case 1:
             $this->logException($tag);
             break;
     }
 }