#2101 [hprojects-module] Housing Projects / Konut Projeleri Modülü yapılması

This commit is contained in:
Diatrex 2020-09-25 17:08:01 +03:00
parent a147b27dff
commit 0cb954c8e6

View File

@ -11,6 +11,7 @@ use Visiosoft\LocationModule\City\CityModel;
use Visiosoft\LocationModule\Country\CountryModel;
use Visiosoft\CartsModule\Cart\Command\GetCart;
use Visiosoft\LocationModule\District\DistrictModel;
use Visiosoft\LocationModule\Neighborhood\NeighborhoodModel;
class AdvModel extends AdvsAdvsEntryModel implements AdvInterface
{
@ -363,4 +364,11 @@ class AdvModel extends AdvsAdvsEntryModel implements AdvInterface
$district = $districtModel->newQuery()->find($this->district);
return $district ? $district->name : false;
}
public function getNeighborhood()
{
$neighborhoodModel = new NeighborhoodModel();
$neighborhood = $neighborhoodModel->newQuery()->find($this->neighborhood);
return $neighborhood ? $neighborhood->name : false;
}
}