MIF_E31211879/application/controllers/Question.php

20 lines
593 B
PHP

<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Question extends CI_Controller {
public function __construct() {
parent::__construct();
$this->load->model('ModelPertanyaan');
}
public function get_FAQ($id_user) {
$questions = $this->ModelPertanyaan->FAQ($id_user);
if (!empty($questions)) {
$this->output->set_output(json_encode($questions));
} else {
$this->output->set_output(json_encode(['message' => 'Tidak ada pertanyaan ditemukan untuk id_user ini.']));
}
}
}