I am using CakePHP 2.5.x
. In single request I am calling paginate()
method twice. In first call, I do not need page
parameter as I am selecting all records for that.
For second call of paginate()
, I am selecting data based on page
parameter found in URL.
Now, concern is that:
http://localhost/xyz/home/get_data/page:1 //working fine
http://localhost/xyz/home/get_data/page:2 //throw 404 from first paginate()
What will be good way to omit page
param for first paginate()
call.
P.S. I am using same model
for both paginate()
call.
Point me if it's duplicate. Thank you in advance.