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
AM
Alice Martin Product Designer
Alice Martin Product Designer
paid design $ 4,200.00 15.01.2024
BC
Bob Chen Backend Engineer
Bob Chen Backend Engineer
pending backend $ 5,800.50 08.03.2024
CN
Carol Novak QA Engineer
Carol Novak QA Engineer
cancelled qa $− 120.00 22.05.2024
DP
David Park Tech Lead
David Park Tech Lead
paid backend $ 9,100.00 30.07.2024
EM
Eva Müller Frontend Engineer
Eva Müller Frontend Engineer
pending frontend $ 3,350.75 11.09.2024

Column options

Display values can be computed from the row. StatusColumn / BadgeColumn take ->value(fn($row) => …) and ->labels(array|Closure); BadgeListColumn renders an array as one badge per item with an ->empty() text; AvatarColumn takes ->name() and ->initials() (two letters by default); DateColumn takes ->timezone() to convert for display without touching PHP's global timezone — compare the two date columns, which show the same stored UTC time.

Computed values, labels, badge list, timezone
Person Status Roles Last login (UTC) Last login (Bratislava)
AM
Alice Martin [email protected]
Active
Admin Editor
15.06.2026 22:30 16.06.2026 00:30
BC
Active
Editor
04.01.2026 08:05 04.01.2026 09:05
CN
Carol Novak [email protected]
Disabled
No roles
20.11.2025 13:45 20.11.2025 14:45

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.

Async row actions

Call ->async() on a FormAction or ConfirmAction to send it with fetch (JSON) instead of a full-page form submit. The response's toast is shown, a failed response (422 included) becomes an error toast from its message, and on success the current table page is re-fetched. The wrapper emits pajak:table:action-success / pajak:table:action-error. Open the overflow menu (…) on a row and try the three actions.

Async form and confirm actions
Invitation Status
[email protected] pending
[email protected] pending
[email protected] expired

Revoke invitation?

The invitee will no longer be able to join.

Icon-only inline actions

Chain ->icon('heroicon-o-*') and ->iconOnly() on any action to render it as a compact 28×28 icon button that fades in on row hover. The label becomes the native title tooltip for accessibility. Combine with ->inlineOnly() to suppress the overflow menu entry entirely.

Icon-only inline 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
AM
Alice Martin
Admin active 15.01.2022
Edit
BC
Bob Chen
Editor active 08.03.2022
Edit
CN
Carol Novak
Viewer inactive 22.05.2022
Edit
DP
David Park
Editor active 30.07.2022
Edit
EM
Eva Müller
Viewer pending 11.09.2022
Edit
FO
Frank Osei
Admin active 03.01.2023
Edit
GK
Grace Kim
Editor active 19.03.2023
Edit
HD
Hana Dvořák
Viewer inactive 07.05.2023
Edit
IT
Ivan Torres
Editor active 24.07.2023
Edit
JN
Jana Novotná
Viewer active 15.09.2023
Edit
Page 1 of 5  –  50 results

Deactivate user?

The user will lose access immediately.

Async initial load

Call ->async() on the builder to skip server-side rendering on first paint. The table chrome (heading, toolbar, empty <tbody>) is rendered immediately; the JS init fires fetchTable() on mount and shows the is-restoring spinner until the first response arrives. Use this when the data is expensive to query or should never be server-rendered.

Async initial load

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.