public function onGetStorefilters() { $result = Store::with('customfields')->whereIsActivated(1); $mapstores = Store::with('customfields')->whereIsActivated(1); $mapstores = $this->StoreFilters($mapstores); $this->mapstores = $mapstores->get(); $result = $this->StoreFilters($result); $result = $this->Pagination($result, post('page') - 1); $this->stores = $result->orderBy('products_number', 'desc')->get(); }