I'm having a very strange problem with pagination with non-root URLs.
The URL: http://local.dev/?page=3 is paginated correctly, showing the correct bit of database info for page 3.
The URL: http://local.dev/test/?page=3 is not paginated correctly, while the URL does suggest it's calling the right information, the page is still displaying the information for page 1.
Before I narrowed it down to being related to the URL, I was commenting out everything from my project, models, views, view composers... everything. Then I tried presenting the same information as I would normally have displayed on the /test/ page on the / page, and everything worked OK.
My routes.php looked this right now:
Route::get('/', function() {
$work_orders = App\WorkOrder::paginate(2);
return $work_orders->render();
});
Route::get('/test', function() {
$work_orders = App\WorkOrder::paginate(2);
return $work_orders->render();
});
I'm really not sure what to do to fix this.