I would like to ask, if what is the proper way of extending a controller in codeigniter. Because right now I am encountering a Fatal error: Class 'ApiController' not found in
both files resides on the same directory api
folder. Here's my code:
<?php
//EchelonApiController.php
class EchelonApiController extends ApiController {
public function __construct() {
parent::__construct();
}
public function index(){
echo 'asd';
}
}
<?php
// ApiController.php
class ApiController extends CI_Controller {
public $table;
public function __construct(){
parent::__construct();
$this->load->models("api/".$table);
}
public function index(){
}
}