mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -06:00
#2101 [hprojects-module] Housing Projects / Konut Projeleri Modülü yapılması
This commit is contained in:
parent
42218c57fb
commit
a147b27dff
@ -1,27 +1,16 @@
|
||||
<?php namespace Visiosoft\AdvsModule\Adv;
|
||||
|
||||
use Anomaly\SelectFieldType\Handler\Currencies;
|
||||
use Anomaly\SettingsModule\Setting\Command\GetSettingValue;
|
||||
use Anomaly\SettingsModule\Setting\Contract\SettingInterface;
|
||||
use Anomaly\SettingsModule\Setting\Contract\SettingRepositoryInterface;
|
||||
use Anomaly\SettingsModule\Setting\SettingRepository;
|
||||
use Anomaly\Streams\Platform\Image\Command\MakeImageInstance;
|
||||
use Anomaly\Streams\Platform\Image\Image;
|
||||
use Anomaly\Streams\Platform\Model\Advs\AdvsCustomFieldsEntryModel;
|
||||
use Anomaly\Streams\Platform\Support\Currency;
|
||||
use GuzzleHttp\Client;
|
||||
use GuzzleHttp\Exception\RequestException;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Money\Currencies\CurrencyList;
|
||||
use Money\Number;
|
||||
use Visiosoft\AdvsModule\Adv\Contract\AdvInterface;
|
||||
use Anomaly\Streams\Platform\Model\Advs\AdvsAdvsEntryModel;
|
||||
use Visiosoft\LocationModule\City\CityModel;
|
||||
use Visiosoft\LocationModule\Country\CountryModel;
|
||||
use Visiosoft\AdvsModule\CustomField\CustomFieldModel;
|
||||
use Visiosoft\CartsModule\Cart\Command\GetCart;
|
||||
|
||||
use Visiosoft\LocationModule\District\DistrictModel;
|
||||
|
||||
class AdvModel extends AdvsAdvsEntryModel implements AdvInterface
|
||||
{
|
||||
@ -360,4 +349,18 @@ class AdvModel extends AdvsAdvsEntryModel implements AdvInterface
|
||||
{
|
||||
return $this->is_get_adv && $this->stock;
|
||||
}
|
||||
|
||||
public function getCity()
|
||||
{
|
||||
$cityModel = new CityModel();
|
||||
$city = $cityModel->newQuery()->find($this->city);
|
||||
return $city ? $city->name : false;
|
||||
}
|
||||
|
||||
public function getDistrict()
|
||||
{
|
||||
$districtModel = new DistrictModel();
|
||||
$district = $districtModel->newQuery()->find($this->district);
|
||||
return $district ? $district->name : false;
|
||||
}
|
||||
}
|
||||
|
||||
@ -130,6 +130,7 @@ class AdvsModuleServiceProvider extends AddonServiceProvider
|
||||
'uses' => 'Visiosoft\AdvsModule\Http\Controller\advsController@store'
|
||||
],
|
||||
'advs/edit_advs/{id}' => [
|
||||
'middleware' => 'auth',
|
||||
'as' => 'visiosoft.module.advs::edit_adv',
|
||||
'uses' => 'Visiosoft\AdvsModule\Http\Controller\advsController@edit',
|
||||
],
|
||||
|
||||
Loading…
Reference in New Issue
Block a user