Skip to content

Instantly share code, notes, and snippets.

@comtom
Last active May 24, 2018 11:10
Show Gist options
  • Select an option

  • Save comtom/292cbbdd7765f12c776a1c76676942b3 to your computer and use it in GitHub Desktop.

Select an option

Save comtom/292cbbdd7765f12c776a1c76676942b3 to your computer and use it in GitHub Desktop.
Redirect index example for codeigniter
class IndexController extends CI_Controller {
function __construct() {
parent::__construct();
$this->load->helper('captcha');
$this->load->model('user', 'user');
}
public function location($location_id) {
$this->index($location_id);
}
public function index($location_id = 1) {
$this->load->model('location', 'location');
...
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment