<?php

defined('BASEPATH') or exit('No direct script access allowed');

// This can be removed if you use __autoload() in config.php OR use Modular Extensions
/** @noinspection PhpIncludeInspection */
require __DIR__.'/REST_Controller.php';

/**
 * This is an example of a few basic user interaction methods you could use
 * all done with a hardcoded array
 *
 * @package         CodeIgniter
 * @subpackage      Rest Server
 * @category        Controller
 * @author          Phil Sturgeon, Chris Kacerguis
 * @license         MIT
 * @link            https://github.com/chriskacerguis/codeigniter-restserver
 */
class Crmpackages extends REST_Controller
{
    public function __construct()
    {
        // Construct the parent class
        parent::__construct();
    }


    public function data_get($id = '')
    {
        $data = $this->Api_model->get_table('crm_packages', $id);
        if ($data) {
            $this->response($data, REST_Controller::HTTP_OK);
        } else {
            $this->response(['status' => false,'message' => 'No data were found'], REST_Controller::HTTP_NOT_FOUND);
        }
    }

}
