Introducing Laravel Quizzes! Play now

Laravel Livewire Tables Documentation

This is the documentation for v2. You can switch versions in the menu at the top. Check your current version with the following command:

composer show rappasoft/laravel-livewire-tables

Available Methods

These are the available search configuration methods on the component.


If you need to programmatically set the search for when the component loads:

setSearch

public function configure(): void
{
    $this->setSearch('Laravel');
}

Search as a whole is enabled by default, but if you ever needed to toggle it you can use the following methods:

setSearchStatus

Enable/disable sorting for the whole component.

public function configure(): void
{
    $this->setSearchStatus(true);
    $this->setSearchStatus(false);
}

setSearchEnabled

Enable search for the whole component.

public function configure(): void
{
    // Shorthand for $this->setSearchStatus(true)
    $this->setSearchEnabled();
}

Disable search for the whole component.

setSearchDisabled

public function configure(): void
{
    // Shorthand for $this->setSearchStatus(false)
    $this->setSearchDisabled();
}

setSearchVisibilityStatus

Show/hide the search box.

public function configure(): void
{
    $this->setSearchVisibilityStatus(true);
    $this->setSearchVisibilityStatus(false);
}

setSearchVisibilityEnabled

Show the search box.

public function configure(): void
{
    // Shorthand for $this->setSearchVisibilityStatus(true)
    $this->setSearchVisibilityEnabled();
}

setSearchVisibilityDisabled

Hide the search box.

public function configure(): void
{
    // Shorthand for $this->setSearchVisibilityStatus(false)
    $this->setSearchVisibilityDisabled();
}

You can only set one of the follow search modifiers:

setSearchDebounce

Set a search debounce in milliseconds on the search box:

public function configure(): void
{
    // Search will wait 1 second before sending request.
    $this->setSearchDebounce(1000);
}

setSearchDefer

Tell Livewire to defer the search request until the following request.

public function configure(): void
{
    // Send the search request with the next network request
    $this->setSearchDefer();
}

setSearchLazy

Tell Livewire to use the lazy modifier.

public function configure(): void
{
    // Send the request when the user clicks away from the search box.
    $this->setSearchLazy();
}