Laravel uses boostrap to customize your pagination buttons. Go into the bootstrap css file and find pagination li and a elements and change them appropriately.
Jun 22, 2017
5
Level 4
How to change the paginator arrow button to string "next" and "previous"
I am using this Illuminate\Pagination\LengthAwarePaginator to do pagination
// Get current page form url e.x. &page=1
$currentPage = LengthAwarePaginator::resolveCurrentPage();
// Create a new Laravel collection from the array data
$itemCollection = collect($items);
// Define how many items we want to be visible in each page
$perPage = 1;
// Slice the collection to get the items to display in current page
$currentPageItems = $itemCollection->slice(($currentPage * $perPage) - $perPage, $perPage)->all();
// Create our paginator and pass it to the view
$paginatedItems= new LengthAwarePaginator($currentPageItems , count($itemCollection), $perPage);
// set url path for generted links
$paginatedItems->setPath($request->url());
return view('items_view', ['items' => $paginatedItems]);
}
During view the next and previous button show as << and >>. How can i change it to Next and Previous?
Please or to participate in this conversation.