Skip to content

Commit 4975f74

Browse files
committed
Bug fix for showing pagination page totals
1 parent b7e2c97 commit 4975f74

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ This package is to displaying the model data in a Grid table.
2626

2727
Run the composer command:
2828

29-
`composer require itstructure/laravel-grid-view "~1.0.11"`
29+
`composer require itstructure/laravel-grid-view "~1.0.12"`
3030

3131
### If you are testing this package from a local server directory
3232

@@ -467,6 +467,6 @@ $gridData = [
467467

468468
## License
469469

470-
Copyright © 2020-2023 Andrey Girnik girnikandrey@gmail.com.
470+
Copyright © 2020-2024 Andrey Girnik girnikandrey@gmail.com.
471471

472472
Licensed under the [MIT license](http://opensource.org/licenses/MIT). See LICENSE.txt for details.

changelog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
### CHANGE LOG:
22

3+
**1.0.12 January 03, 2024**
4+
- Bug fix for showing pagination page totals.
5+
36
**1.0.11 February 18, 2023:**
47
- Add support for Laravel 10
58

resources/views/grid.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
@if ($paginator->onFirstPage())
1919
{!! trans('grid_view::grid.page-info', [
2020
'start' => '<b>1</b>',
21-
'end' => '<b>' . $paginator->perPage() . '</b>',
21+
'end' => '<b>' . min($paginator->perPage(), $paginator->total()) . '</b>',
2222
'total' => '<b>' . $paginator->total() . '</b>',
2323
]) !!}
2424
@elseif ($paginator->currentPage() == $paginator->lastPage())

0 commit comments

Comments
 (0)