Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
syncEnrollments
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Yeray Santana Hualde
syncEnrollments
Commits
bbae90ad
Commit
bbae90ad
authored
Feb 06, 2012
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix pagination comment.
parent
cd17761f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
query.php
laravel/database/query.php
+7
-7
No files found.
laravel/database/query.php
View file @
bbae90ad
...
...
@@ -655,19 +655,19 @@ class Query {
public
function
paginate
(
$per_page
=
20
,
$columns
=
array
(
'*'
))
{
// Because some database engines may throw errors if we leave orderings
// on the query when retrieving the total number of records, we
will
//
remove all of the ordreings and put them back on the query after
//
we have the count
.
// on the query when retrieving the total number of records, we
'll drop
//
all of the ordreings and put them back on the query after we have
//
retrieved the count from the table
.
list
(
$orderings
,
$this
->
orderings
)
=
array
(
$this
->
orderings
,
null
);
$page
=
Paginator
::
page
(
$total
=
$this
->
count
(
$columns
),
$per_page
);
$this
->
orderings
=
$orderings
;
// Now we're ready to get the actual pagination results from the
//
database table. The "for_page" method provides a convenient
//
way to set the limit and offset so we get the correct span
// of results from the table.
// Now we're ready to get the actual pagination results from the
table
//
using the for_page and get methods. The "for_page" method provides
//
a convenient way to set the limit and offset so we get the correct
//
span
of results from the table.
$results
=
$this
->
for_page
(
$page
,
$per_page
)
->
get
(
$columns
);
return
Paginator
::
make
(
$results
,
$total
,
$per_page
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment