Custom Empty State

Customize what users see when the table has no records to display.

$this->setEmptyMessage('No results')
Example Usage EmptyStateTable.php
public function configure(): void
{
    $this->setPrimaryKey('id')
        // A single message is shown when there are no results
        ->setEmptyMessage('No Users Found - try adjusting your search or filters.');
}

Demo Pre-loaded

This demo is pre-loaded with a search term that matches nothing, so you can see the custom empty state immediately. Clear the search box to see the actual data.

Not available in v3

v3 has exactly one empty-state string, set with setEmptyMessage(). There is no separate emptyStateDescription(), no emptyState(View) and no hideWhenEmpty(). The message is escaped when rendered, so HTML is not supported - richer markup requires publishing and overriding the package's empty-state view.

setEmptyMessage(string)

Set the message shown when there are no results

getEmptyMessage()

Read the currently configured empty message

Live Demo - Custom Empty State

Notice the custom empty message. Clear the search to see data.

No Users Found - we couldn't find any users matching your search criteria. Try adjusting your search or removing some filters to see more results.

Showing 0 results