CodeIgniter Basic Tutorial
Performance & Utilities
CodeIgniter Advanced
In CodeIgniter, a Controller is a PHP class that acts as the middleman between the user (browser) and your application logic.
It receives requests from the browser, processes them (using models if needed), and then loads the appropriate view.
application/controllers/
(CodeIgniter 3)app/Controllers/
(CodeIgniter 4)return view('page_view', $data);
return redirect()->to('/dashboard');
public function getData() { return $this->response->setJSON(['a', 'b', 'c']); }