I\'m building a RESTS like service in PHP that should accept a large JSON post as main data (I send and read the data much like discussed here: http://forums.laravel.io/view
I think most of the time it is not necessary to increase the max_input_vars
size,
but to optimize your code,
i had faced this problem when getting all results from one ajax request and sending that results to another ajax request.
So what i have done is stringified the array from the db results,
JSON.stringify(totalResults);
in javascript JSON.stringify
convert array to string so after converting i have send that string to another request and decoded that string to array again using json_decode
in php,
so i got that original array again,
i hope this can help someone so i have shared it, thank you.