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-02-24 16:01:32 -06:00

19 lines
No EOL
452 B
PHP

<?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")]);
});
}
}