Named Scopes with CodeIgniter

codeigniter, database, models, php

Named scopes are a really powerful feature of models - they allow you to define a clean, concise syntax when performing queries within your models - and best of all, are really easy to utilise in CodeIgniter.

Read more »

Better Controllers and Models in CodeIgniter

codeigniter, controllers, models

CodeIgniter is an expressive, flexible gorgeous web application framework, but it is often a little too simple for my personal convenience. In my recent talk at EECI I talked about my experiences with Ruby on Rails and how the PHP and CodeIgniter community could learn from it, and showed off my MY_Controller.php and MY_Model.php classes. I’ve had a few people ask me about them and so I thought I’d release them and write a tutorial here so that you guys can speed up your development and write better applications.

Read more »