-
Notifications
You must be signed in to change notification settings - Fork 0
Models
wilburhimself edited this page Mar 29, 2011
·
2 revisions
Fastbreak uses the Active Record pattern to interact with the database through Models.
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();
}
}