Пример #1
0
 /**
  * Display setting store page
  *
  * @return response
  */
 public function store()
 {
     $cities = select(City::select('id', 'name')->get());
     $districts = ['' => _t('select_district')];
     $wards = ['' => _t('select_ward')];
     $categories = select(Category::select('id', 'name')->get());
     $store = store();
     if (user()->store !== null) {
         $districts += select($this->_getDistrictsByCityId($store->city_id)->keyBy('id'));
         $wards += select($this->_getWardsByCityId($store->district_id)->keyBy('id'));
     }
     return view('frontend::setting.store', ['categories' => ['' => _t('select_category')] + $categories, 'cities' => ['' => _t('select_city')] + $cities, 'districts' => $districts, 'wards' => $wards, 'store' => $store]);
 }