paulmuldoon / laravel-results-summary
A Blade component for displaying a summary of items in a collection
Package info
github.com/paulmuldoon151/laravel-results-summary
pkg:composer/paulmuldoon/laravel-results-summary
v1.0.0
2026-07-22 16:46 UTC
Requires
- php: ^8.2
- illuminate/pagination: ^10.0 || ^11.0 || ^12.0 || ^13.0
- illuminate/support: ^10.0 || ^11.0 || ^12.0 || ^13.0
- illuminate/view: ^10.0 || ^11.0 || ^12.0 || ^13.0
README
A Blade component for displaying a summary of items in a collection.
Compatibility
| Package Version | Laravel Version | PHP Version |
|---|---|---|
| ^1.0.0 | 10.x, 11.x, 12.x, 13.x | ^8.2 |
Installation
composer require paulmuldoon/laravel-results-summary
Usage
Paginated:
<x-results-summary class="text-gray-800 text-sm mb-3 font-bold" :items="$cars" empty="No cars found." :paginated="true" label="car" />
Showing 5 of 24 cars
Non-paginated:
<x-results-summary class="text-gray-800 text-sm mb-3 font-bold" :items="$cars" empty="No cars found." :paginated="false" label="car" />
24 cars
Props
- :items - takes a collection of items to summarise, example "$cars".
- empty - the message displayed if the collection is empty, example "No cars found". Default is "No items found."
- :paginated - set to "true" if you are using a paginator on the collection. Default is "false". Will show for example "Showing 10 out of 25 cars" when this is set to true and "10 cars" if set to false.
- label - singular noun used to describe the collection being summarised, example "car". This will be pluralised automatically by the component if more than one item is found in the collection.
Attributes
Takes standard HTML attributes such as class, id etc.