Ejemplo n.º 1
0
 public function get_komentar($f3)
 {
     $id = $f3->get('PARAMS.id');
     $komen = new \models\CommentsM();
     $komentar = $komen->get_komen($id);
     foreach ($komentar as $k) {
         $list[] = $k->cast();
     }
     if (count($list) > 0) {
         $this->set_code("01");
         $this->set_msg("Ok");
         $this->set_data("komentar", $list);
     } else {
         $this->set_code("00");
         $this->set_msg("Belum ada komentar");
     }
     $this->return_json();
 }
Ejemplo n.º 2
0
 function komen()
 {
     echo '<pre>';
     $kom = new \models\CommentsM();
     print_r($kom->get_komen(1));
 }