Example #1
0
 public function api_save($data)
 {
     $model = new FeedbackModel($data);
     if ($model->save()) {
         return ['result' => 'success'];
     } else {
         return ['result' => 'error', 'error' => $model->getErrors()];
     }
 }