Skip to content
wilburhimself edited this page Mar 29, 2011 · 2 revisions

Fastbreak uses the Active Record pattern to interact with the database through Models.

Getting Started

Models live in the models folder and shares the naming convention of Controllers. A file named after the model class in lowercase as bar.php

The simplest code for a Model is:

class Bar extends Model {
    public function __construct() {
        $this->type = "bar";
        $this->table_name = "bars";
        parent::__construct();
    }
}
Clone this wiki locally