pagination in laravel 8 goes to the top of the page
I have added pagination method on of the table result in the blade, but I placed the table below the page and every time I click on the next page it takes me to the top of the page which is really annoying scrolling down to the page every time I click on the specific page. Does anybody have a solution to stay right where we first clicked on the page?
Your pages reload after clicking the next page right? Does your table have an id?
I think one of the easiest ways is to concatenate the id of your table at the end of the URL/href of the next page button
@MohamedTammam The table is inside blade but query is in the controller, how query function inside controller can recognize table id which is written inside the blade?