In this note I write down my experience regarding multiple paginationin the same page using Laravel 5:
In your laravel controller:
// Program Degree $object1s = Object1::orderBy('name', 'desc') ->paginate(2, ['*'], 'page_1s'); // Master Program $object2s = Object2::orderBy('name', 'desc') ->paginate(2, ['*'], 'page_2s'); // Online Course $object3s = Object3::orderBy('name', 'desc') ->paginate(2, ['*'], 'page_3s');
In your laravel view:
// Nothing to change in the view
Now you will have following paginated urls in your application:
- http://localhost:8000/yourpage?page_1s=2
- http://localhost:8000/yourpage?page_2s=2
- http://localhost:8000/yourpage?page_3s=2
- for special purpose you can custom url to handle all paginations in same time become: