Skip to content

Commit 6544908

Browse files
committed
Fix pagination text when table is empty.
1 parent aa05922 commit 6544908

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
@if ($paginationEnabled)
1+
@if ($paginationEnabled && $models->count())
22
<div class="row">
33
<div class="col">
44
{{ $models->links() }}
55
</div>
66

77
<div class="col text-right text-muted">
8-
{{ __('Showing :first to :last out of :total results', ['first' => $models->firstItem(), 'last' => $models->lastItem(), 'total' => $models->total()]) }}
8+
{{ __('Showing :first to :last out of :total results', ['first' => $models->count() ? $models->firstItem() : 0, 'last' => $models->count() ? $models->lastItem() : 0, 'total' => $models->total()]) }}
99
</div>
1010
</div>
1111
@endif

0 commit comments

Comments
 (0)