mirror of
https://github.com/openclassify/openclassify.git
synced 2026-02-08 22:36:06 -06:00
#1315 avantaj çelik harita alanının yapılması /advantage in steel map selection
This commit is contained in:
parent
eaefe6b21f
commit
e6e56da78e
@ -6,6 +6,7 @@ use Visiosoft\LocationModule\Country\CountryModel;
|
|||||||
use Visiosoft\LocationModule\District\DistrictModel;
|
use Visiosoft\LocationModule\District\DistrictModel;
|
||||||
use Visiosoft\LocationModule\Neighborhood\NeighborhoodModel;
|
use Visiosoft\LocationModule\Neighborhood\NeighborhoodModel;
|
||||||
use Visiosoft\LocationModule\Village\VillageModel;
|
use Visiosoft\LocationModule\Village\VillageModel;
|
||||||
|
use Illuminate\Support\Str;
|
||||||
|
|
||||||
class AjaxController extends PublicController
|
class AjaxController extends PublicController
|
||||||
{
|
{
|
||||||
@ -103,4 +104,19 @@ class AjaxController extends PublicController
|
|||||||
return $this->village_model->whereIn('parent_neighborhood_id', $id)->orderBy('order', 'ASC')->get();
|
return $this->village_model->whereIn('parent_neighborhood_id', $id)->orderBy('order', 'ASC')->get();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function getCity()
|
||||||
|
{
|
||||||
|
if ($this->request->name) {
|
||||||
|
$slug = Str::slug($this->request->name, '_');
|
||||||
|
if ($city = $this->city_model->newQuery()->where('slug', 'LIKE', $slug . '%')->first()) {
|
||||||
|
return ['success' => true, 'link' => route('visiosoft.module.advs::list') . '?city[]=' . $city->id];
|
||||||
|
} else {
|
||||||
|
return ['success' => false];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@ -84,6 +84,7 @@ class LocationModuleServiceProvider extends AddonServiceProvider
|
|||||||
'as' => 'location::getCities',
|
'as' => 'location::getCities',
|
||||||
'uses' => 'Visiosoft\LocationModule\Http\Controller\AjaxController@getCities'
|
'uses' => 'Visiosoft\LocationModule\Http\Controller\AjaxController@getCities'
|
||||||
],
|
],
|
||||||
|
'ajax/get-city' => 'Visiosoft\LocationModule\Http\Controller\AjaxController@getCity',
|
||||||
'ajax/getDistricts' => [
|
'ajax/getDistricts' => [
|
||||||
'as' => 'location::getDistricts',
|
'as' => 'location::getDistricts',
|
||||||
'uses' => 'Visiosoft\LocationModule\Http\Controller\AjaxController@getDistricts'
|
'uses' => 'Visiosoft\LocationModule\Http\Controller\AjaxController@getDistricts'
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user