Closed
Description
Issue
If I use the pageName
parameter by default, that is, page
, then there are no errors:
return CarsClass::query()
->orderBy('title')
->paginate($this->per_page);
BUT if you pass the custom key name, the result of caching is the first open page.
For example, the table contains 30 entries and we output the result with a pagination of 10 entries and a page. When you open the reference /?page-all-models=2
, we get the elements for the first page. Next, go to the second page, but the paginator along with the data will still contain information about the first page.
return CarsClass::query()
->orderBy('title')
->paginate($this->per_page, ['*'], 'page-all-models');
Environment
Laravel Version: 5.6.23
Laravel Model Caching Package Version: 0.2.58
PHP Version: 7.2.0
Homestead Version: 7.6.0
Operating System & Version: Windows 10 Pro