A set of plugins to help on managing geographic information
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\Geo\Country\Classes;
|
||||
|
||||
use ORM\Entity as Entity;
|
||||
use App\Geo\State\Classes\State as State;
|
||||
|
||||
class Country extends Entity {
|
||||
|
||||
const _tableName = "geo_countries";
|
||||
|
||||
const _listable = Array(
|
||||
'id',
|
||||
'name',
|
||||
'code',
|
||||
'iso2',
|
||||
'iso3',
|
||||
);
|
||||
|
||||
const _orderable = Array(
|
||||
|
||||
);
|
||||
|
||||
public function states(){
|
||||
return $this->hasMany(State::class, 'country_id', $this);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user