This repository has been archived on 2024-10-04. You can view files and clone it, but cannot push or open issues or pull requests.
AroMVC/Models/Company.php
2017-03-02 16:02:38 -06:00

17 lines
No EOL
423 B
PHP

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