F
Filament3mo ago
aksl

Widget Table : display records count

Hello, on my dashboard, I display a Table widget. I'd like the number of entries to be displayed. Like in a classic table, for example "Showing X of X results". I can't find a way to do this Thanks for your help
2 Replies
Adam
Adam3mo ago
In your table widget class just include the CanPaginateRecords trait.
use Filament\Tables\Concerns\CanPaginateRecords;

class TableWidget extends BaseWidget
{
use CanPaginateRecords;

public function table(Table $table): Table
{
//
}
}
use Filament\Tables\Concerns\CanPaginateRecords;

class TableWidget extends BaseWidget
{
use CanPaginateRecords;

public function table(Table $table): Table
{
//
}
}
aksl
akslOP3mo ago
perfect, thank you 🙂 I couldn't find it in the doc!

Did you find this page helpful?