Components

Table

A full-featured data table built with a PHP fluent builder API. Sortable columns, multi-type filters, typed row and bulk actions, column visibility persisted to localStorage, and a flexible paginator abstraction. All interactions (sort, filter, paginate) are handled via AJAX without full-page navigation.

Table

Build a table with a PHP fluent API — Table::make() — and render it with a single Blade tag. Pass column, filter, action, and bulk-action definitions in PHP; the component handles all markup, sort state, column visibility, and pagination automatically.

Basic usage
Status
Alice Martin Admin active 15.01.2022
Bob Chen Editor active 08.03.2022
Carol Novak Viewer inactive 22.05.2022
David Park Editor active 30.07.2022
Eva Müller Viewer pending 11.09.2022

Pagination

Pass an ArrayPaginator or EloquentPaginator as :paginator. Both implement the same TablePaginator contract. Use ->perPageOptions([5, 10, 25]) on the builder to expose a per-page selector — the current $tableRequest->perPage value is what the paginator receives.

Paginated table with per-page selector
Alice Martin Admin 15.01.2022
Bob Chen Editor 08.03.2022
Carol Novak Viewer 22.05.2022
David Park Editor 30.07.2022
Eva Müller Viewer 11.09.2022
Page 1 of 10  —  50 results

Column types

Every built-in column variant in one table: AvatarColumn with initials, TwoLineColumn with primary/secondary text, StatusColumn with a color map, BadgeColumn for type chips, AmountColumn for sign-aware money, and DateColumn with configurable format. Columns declared ->hidden() are off by default but user-toggleable.

All column variants
Avatar Two-line Status Badge
A
Alice Martin Product Designer
Alice Martin Product Designer
paid design $ 4,200.00 15.01.2024
B
Bob Chen Backend Engineer
Bob Chen Backend Engineer
pending backend $ 5,800.50 08.03.2024
C
Carol Novak QA Engineer
Carol Novak QA Engineer
cancelled qa $− 120.00 22.05.2024
D
David Park Tech Lead
David Park Tech Lead
paid backend $ 9,100.00 30.07.2024
E
Eva Müller Frontend Engineer
Eva Müller Frontend Engineer
pending frontend $ 3,350.75 11.09.2024

Filters

Four filter types are available: TextFilter (contains / equals operators), SelectFilter (multi-select checkboxes), DateFilter (from/to date pickers), and NumberFilter (min/max). Active filters render as removable chips in the toolbar. Apply them server-side with TableFilters::apply($items, $tableRequest->filters).

Text, select, number and date filters
Status
Alice Martin Engineering active $ 72,000 01.03.2023
Bob Chen Design active $ 64,000 15.07.2022
Carol Novak Marketing inactive $ 58,000 20.11.2021
David Park Engineering active $ 95,000 08.04.2020
Eva Müller HR pending $ 51,000 10.01.2024
Frank Osei Engineering active $ 88,000 03.09.2019

Row actions

Four action types are available: LinkAction for navigation, FormAction for POST/DELETE submissions, ConfirmAction for destructive operations that need a dialog, and ModalAction to open an existing modal by ID. Use ->inlineOnly() or ->overflowOnly() to control placement, and ->visibleIf(fn($row) => ...) for conditional visibility. Mark an action ->danger() to render it in red.

Link, confirm and form actions
Client
INV-1001 Acme Corp paid 1,250.00 € 01.02.2024
INV-1002 Globex Ltd pending 875.50 € 15.03.2024
INV-1003 Initech draft 2,100.00 € 30.04.2024
INV-1004 Umbrella Inc paid 340.00 € 10.05.2024
INV-1005 Hooli pending 5,600.00 € 22.06.2024

Delete invoice?

This will permanently remove the invoice and cannot be undone.

Bulk actions

Add ->bulkActions([...]) to enable row checkboxes and a floating bulk-action bar. Any action type works as a bulk action. The bar appears once at least one row is selected and reports the selection count. Per-row actions can be combined with bulk actions on the same table.

Bulk actions with per-row actions
Name
A
Alice Martin
Admin active 15.01.2022
Edit
B
Bob Chen
Editor active 08.03.2022
Edit
C
Carol Novak
Viewer inactive 22.05.2022
Edit
D
David Park
Editor active 30.07.2022
Edit
E
Eva Müller
Viewer pending 11.09.2022
Edit
F
Frank Osei
Admin active 03.01.2023
Edit
G
Grace Kim
Editor active 19.03.2023
Edit
H
Hana Dvořák
Viewer inactive 07.05.2023
Edit
I
Ivan Torres
Editor active 24.07.2023
Edit
J
Jana Novotná
Viewer active 15.09.2023
Edit
Page 1 of 5  —  50 results

Deactivate user?

The user will lose access immediately.

Empty state

When the paginator returns zero items the table automatically renders a built-in empty state with a configurable title and subtitle via the translation file pajak::table. Pass an empty collection to ArrayPaginator to trigger it.

Empty state
Status

Nothing here yet

No items have been added.