From bcd590560f4aec3bdaf1e8f50a9642621adac761 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 23 Nov 2011 00:12:42 -0600 Subject: [PATCH] adding paginator commetns. --- laravel/paginator.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/laravel/paginator.php b/laravel/paginator.php index 8196feea..98259eb0 100644 --- a/laravel/paginator.php +++ b/laravel/paginator.php @@ -210,6 +210,14 @@ public function slider($adjacent = 3) { $window = $adjacent * 2; + // If the current page is so close to the beginning that we do not have + // room to create a full sliding window, we will only show the first + // several pages, followed by the ending section of the slider. + // + // Likewise, if the page is very close to the end, we will create the + // beginning of the slider, but just show the last several pages at + // the end of the slider. + // // Example: 1 [2] 3 4 5 6 ... 23 24 if ($this->page <= $window) {