<?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 FAQ_get($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.']));
        }
    }
}
