The elegant PHP framework with exceptional performance, rock-solid security, and a developer experience that makes building web applications a joy.
Built for modern development with features that matter most to today's developers.
Optimized for speed with minimal overhead. Your applications run blazingly fast with CodeIgniter's lightweight architecture.
Built-in security features including XSS filtering, CSRF protection, and SQL injection prevention keep your apps safe.
Clean separation of logic, presentation, and data with the proven Model-View-Controller pattern.
Comprehensive library of helpers, database abstraction, form validation, caching, and more out of the box.
Built-in support for creating robust RESTful APIs with authentication, rate limiting, and JSON responses.
Clear, comprehensive documentation with practical examples that get you productive quickly.
Write beautiful, maintainable PHP code with CodeIgniter's intuitive syntax and powerful features that handle the heavy lifting for you.
<?php
namespace App\Controllers;
use App\Models\UserModel;
use CodeIgniter\HTTP\ResponseInterface;
class UserController extends BaseController
{
protected $userModel;
public function __construct()
{
$this->userModel = new UserModel();
}
public function index(): ResponseInterface
{
$users = $this->userModel
->where('active', true)
->orderBy('created_at', 'DESC')
->paginate(20);
return $this->response->setJSON([
'status' => 'success',
'data' => $users
]);
}
}