Skip to content

Commit 4ae7ab4

Browse files
committed
Removed pageName
1 parent 9fe169f commit 4ae7ab4

File tree

2 files changed

+3
-12
lines changed

2 files changed

+3
-12
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ class PublicationsController extends Controller
8787
$publications->withPath('/admin/users')
8888
->appends(['sort' => 'votes'])
8989
->withQueryString()
90-
->fragment('users');
90+
->fragment('users')
91+
->setPageName('publications_page');
9192

9293
return view('publications.index', compact('publications'));
9394
}

src/PaginationMerge.php

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,21 +30,13 @@ class PaginationMerge
3030
*/
3131
protected $total;
3232

33-
/**
34-
* The query string variable used to store the page.
35-
*
36-
* @var string
37-
*/
38-
protected $pageName;
39-
4033
/**
4134
* Merge paginator instances
4235
*
4336
* @param mixed $paginators
44-
* @param string $pageName
4537
* @return $this
4638
*/
47-
public function merge($paginators, $pageName = 'page')
39+
public function merge($paginators)
4840
{
4941
$paginators = is_array($paginators) ? $paginators : func_get_args();
5042

@@ -73,7 +65,6 @@ public function merge($paginators, $pageName = 'page')
7365
$this->items = $items;
7466
$this->perPage = $perPage;
7567
$this->total = $total;
76-
$this->pageName = $pageName;
7768

7869
return $this;
7970
}
@@ -119,7 +110,6 @@ public function get()
119110
LengthAwarePaginator::resolveCurrentPage(),
120111
[
121112
'path' => LengthAwarePaginator::resolveCurrentPath(),
122-
'pageName' => $this->pageName,
123113
]
124114
);
125115
}

0 commit comments

Comments
 (0)