In my project I have a "products" model. Products model is related with another model called "brand". In "products" listing page I need to filter records depending upon a "brand". I have fetched all the brands from "brand" model and listed them in the filter.
# ===================================
# Filter Scope Definitions
# ===================================
scopes:
brand:
label: Brand
modelClass: October\Demo\Models\Brand
nameFrom: name
scope: FilterBrands
If I have the brands lesser than or equal to 500 records in DB, the listing filter in product model is working good. But if I have the records more than 500 it is not working.
Found the solution.
Set/Update the maximum input value for "max_input_vars" attribute in php.ini file
http://php.net/manual/en/info.configuration.php#ini.max-input-vars
Or else you may add maximum input value in htaccess file as php_value max_input_vars 10000
I tried to set a maximum value for "max_input_vars" but it doesn't work. I found a temporary solution for this issue, so, we have to modify the line $query->limit(500) in Filter.php file and voila. The problem is going to be when we update the October version that these changes are lost so we should keep that in mind ;-)