Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Livewire Tables Laravel Package

rappasoft/laravel-livewire-tables

Laravel Livewire Tables provides dynamic, feature-rich data tables for Laravel Livewire with sorting, searching, filtering, pagination, bulk actions, and Bootstrap/Tailwind support. Build reusable table components backed by Eloquent queries.

View on GitHub
Deep Wiki
Context7

title: Available Methods weight: 1

These are the available configuration methods for pagination.


setPageName

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

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

setPaginationStatus

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

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

setPaginationEnabled

Enable pagination for the component.

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

setPaginationDisabled

Disable pagination for the component.

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

setPaginationVisibilityStatus

Enabled by default, enable/disable pagination visibility.

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

setPaginationVisibilityEnabled

Enable pagination visibility.

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

setPaginationVisibilityDisabled

Disable pagination visibility.

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

setPerPageVisibilityStatus

Enabled by default, enable/disable per page visibility.

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

setPerPageVisibilityEnabled

Enable per page visibility.

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

setPerPageVisibilityDisabled

Disable per page visibility.

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

setPerPageAccepted

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

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

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

setPerPage

Set the selected option of the per page dropdown.

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

setDefaultPerPage

Set the default selected option of the per-page dropdown, will be over-ridden if set at Session or QueryString level.

public function configure(): void
{
    $this->setDefaultPerPage(10);
}

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:

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

You may specify cursorPaginate like so:

public function configure(): void
{
    $this->setPaginationMethod('cursor');
}

getPerPageDisplayedItemIds

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

    $this->getPerPageDisplayedItemIds();

getPerPageDisplayedItemCount

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

    $this->getPerPageDisplayedItemCount();

setDisplayPaginationDetailsEnabled

Enables display of Pagination Details (e.g. Displaying Rows x of y) - default behaviour

public function configure(): void
{
    $this->setDisplayPaginationDetailsEnabled();
}

setDisplayPaginationDetailsDisabled

Disables display of Pagination Details (e.g. Displaying Rows x of y)

public function configure(): void
{
    $this->setDisplayPaginationDetailsDisabled();
}

setPerPageFieldAttributes

Allows for customisation of the appearance of the "Per Page" dropdown

Note that this utilises a refreshed approach for attributes, and allows for appending to, or replacing the styles and colors independently, via the below methods.

default-colors

Setting to false will disable the default colors for the Per Page dropdown, the default colors are: Bootstrap: None

Tailwind: border-gray-300 focus:border-indigo-300 focus:ring-indigo-200 dark:bg-gray-700 dark:text-white dark:border-gray-600

default-styling

Setting to false will disable the default styling for the Per Page dropdown, the default styling is: Bootstrap 4: form-control

Bootstrap 5: form-select

Tailwind: block w-full rounded-md shadow-sm transition duration-150 ease-in-out sm:text-sm sm:leading-5 focus:ring focus:ring-opacity-50

public function configure(): void
{
    $this->setPerPageFieldAttributes([
        'class' => 'border-red-300 focus:border-indigo-300 focus:ring-indigo-200 dark:bg-red-700 dark:text-white dark:border-red-600', // Add these classes to the dropdown
        'default-colors' => false, // Do not output the default colors
        'default-styles' => true, // Output the default styling
    ]);
}

setShouldRetrieveTotalItemCountStatus

Used when "simple" pagination is being used, allows the enabling/disabling of the "total records" count. This may be desirable to disable in larger data sets. This is enabled by default.

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

setShouldRetrieveTotalItemCountEnabled

Used when "simple" pagination is being used, enables the "total records" count.

public function configure(): void
{
    $this->setShouldRetrieveTotalItemCountEnabled();
}

setShouldRetrieveTotalItemCountDisabled

Used when "simple" pagination is being used, disables the "total records" count.

public function configure(): void
{
    $this->setShouldRetrieveTotalItemCountDisabled();
}

setPaginationWrapperAttributes

Used to set attributes for the "div" that wraps the pagination section

public function configure(): void
{
    $this->setPaginationWrapperAttributes(['class' => 'text-lg']);
}
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport
twbs/bootstrap4