mirror of
https://github.com/openclassify/openclassify.git
synced 2026-03-01 00:54:38 -06:00
20 lines
619 B
PHP
20 lines
619 B
PHP
<?php namespace Visiosoft\LocationModule\Village;
|
|
|
|
use Visiosoft\LocationModule\Village\Contract\VillageInterface;
|
|
use Anomaly\Streams\Platform\Model\Location\LocationVillageEntryModel;
|
|
|
|
class VillageModel extends LocationVillageEntryModel implements VillageInterface
|
|
{
|
|
public function getVillages() {
|
|
return VillageModel::all();
|
|
}
|
|
|
|
public function getSubVillages($neighborhood) {
|
|
return $this->query()->where('parent_neighborhood_id', $neighborhood)->get();
|
|
}
|
|
|
|
public function deleteVillageByNeighborhood($id) {
|
|
$this->where('parent_neighborhood_id',$id)->delete();
|
|
}
|
|
}
|