Laravel Livewire Tables Documentation

🎉 Enjoying this package? Consider sponsoring me on GitHub or buying me a beer.

This is the documentation for v2 but the latest version is v3. 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 configuration methods for pagination.


setPageName

Set the page name for the component's pagination, defaults to page.

1public function configure(): void
2{
3 $this->setPageName('users');
4}

setPaginationStatus

Enabled by default, enable/disable pagination for the component.

1public function configure(): void
2{
3 $this->setPaginationStatus(true);
4 $this->setPaginationStatus(false);
5}

setPaginationEnabled

Enable pagination for the component.

1public function configure(): void
2{
3 // Shorthand for $this->setPaginationStatus(true);
4 $this->setPaginationEnabled();
5}

setPaginationDisabled

Disable pagination for the component.

1public function configure(): void
2{
3 // Shorthand for $this->setPaginationStatus(false);
4 $this->setPaginationDisabled();
5}

setPaginationVisibilityStatus

Enabled by default, enable/disable pagination visibility.

1public function configure(): void
2{
3 $this->setPaginationVisibilityStatus(true);
4 $this->setPaginationVisibilityStatus(false);
5}

setPaginationVisibilityEnabled

Enable pagination visibility.

1public function configure(): void
2{
3 // Shorthand for $this->setPaginationVisibilityStatus(true);
4 $this->setPaginationVisibilityEnabled();
5}

setPaginationVisibilityDisabled

Disable pagination visibility.

1public function configure(): void
2{
3 // Shorthand for $this->setPaginationVisibilityStatus(false);
4 $this->setPaginationVisibilityDisabled();
5}

setPerPageVisibilityStatus

Enabled by default, enable/disable per page visibility.

1public function configure(): void
2{
3 $this->setPerPageVisibilityStatus(true);
4 $this->setPerPageVisibilityStatus(false);
5}

setPerPageVisibilityEnabled

Enable per page visibility.

1public function configure(): void
2{
3 // Shorthand for $this->setPerPageVisibilityStatus(true);
4 $this->setPerPageVisibilityEnabled();
5}

setPerPageVisibilityDisabled

Disable per page visibility.

1public function configure(): void
2{
3 // Shorthand for $this->setPerPageVisibilityStatus(false);
4 $this->setPerPageVisibilityDisabled();
5}

setPerPageAccepted

Set the accepted values for the per page dropdown. Defaults to [10, 25, 50]

1public function configure(): void
2{
3 $this->setPerPageAccepted([10, 25, 50, 100]);
4}

Note: Set an option of -1 to enable All.

setPerPage

Set the default selected option of the per page dropdown.

1public function configure(): void
2{
3 $this->setPerPage(10);
4}

Note: The value set must be included in the per page accepted values.

setPaginationMethod

Set the pagination method. By default, the table will use the paginate method.

You may specify simplePaginate like so:

1public function configure(): void
2{
3 $this->setPaginationMethod('simple');
4}

getPerPageDisplayedItemIds

Returns the Primary Key for the currently visible rows in an array. This should be used in a blade to ensure accuracy.

1$this->getPerPageDisplayedItemIds();

getPerPageDisplayedItemCount

Returns the number of rows that are currently displayed. This should be used in a blade to ensure accuracy.

1$this->getPerPageDisplayedItemCount();