From 289c02ab47737d263df9d13fc1db317188dac115 Mon Sep 17 00:00:00 2001 From: Jakobud Date: Mon, 23 Jul 2012 15:50:04 -0600 Subject: [PATCH] Added documentation for paginate's second optional argument. Signed-off-by: Jakobud --- laravel/documentation/views/pagination.md | 36 +++++++++++++---------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/laravel/documentation/views/pagination.md b/laravel/documentation/views/pagination.md index 602b09ba..95b5479b 100644 --- a/laravel/documentation/views/pagination.md +++ b/laravel/documentation/views/pagination.md @@ -22,6 +22,10 @@ Let's walk through a complete example of paginating using the [Fluent Query Buil $orders = DB::table('orders')->paginate($per_page); +You can also pass an optional array of table columns to select in the query: + + $orders = DB::table('orders')->paginate($per_page, array('id', 'name', 'created_at')); + #### Display the results in a view: results as $order): ?> @@ -75,30 +79,30 @@ Sometimes you may need to create a Paginator instance manually, without using th All pagination link elements can be style using CSS classes. Here is an example of the HTML elements generated by the links method: - When you are on the first page of results, the "Previous" link will be disabled. Likewise, the "Next" link will be disabled when you are on the last page of results. The generated HTML will look like this: - Previous \ No newline at end of file + Previous