Sep 29, 2020
0
Level 4
Pagination with two methods of navigation
I'm relatively new to Laravel and would like to implement pagination. For example, when a user performs a ajax search, it retrieves the record and populates a side menu with a list of full_name and date_travel:
$.each(data.result.data, function(index) {
counter = index + 1;
$("#search_result").append('<li><a href="test/fetch/"+data.result.data[index].id+>'+counter+' '+data.result.data[index].full_name+': '+data.result.data[index].date_travel+'</a></li>');
});
}
Also, ajax search will display the first record on the form. The form will also have a paginate method, but just be able to go to the previous record and next record only.
So the user will have the ability to look at side menu and click on the record or press the previous/next button to navigate record by record.
What is the best method of syncing the list with the previous and next record using ajax so a user can perform a update on a form using pagination.
Thank you in advance.
Please or to participate in this conversation.