17 lines
No EOL
423 B
PHP
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")]);
|
|
});
|
|
}
|
|
} |