<?php
namespace AroMVC\Models;
use \AroMVC\Core\Model;
use \AroMVC\Core\Database as db;
class Company extends Model {
protected $id;
protected $name;
protected $states;
protected function initialize() {
$this->addHook("states", function() {
return db::select("*")
->from("States")
->where("`cid` = ?")
->params([$this->get("id")]);
});
}