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: Lifecycle Hooks weight: 7

With the migration to Livewire 3, there we are implementing several Lifecycle Hooks to assist with re-using methods across multiple Table Components.

You may use these either in your Table Component, or in a trait

configuring

This is called immediately prior to the configure() method being called. This will be overridden by anything you define in configure()

configured

This is called immediately after the configure() method is called. This will override anything you define in configure()

settingColumns

This is called prior to setting up the available Columns via the columns() method

columnsSet

This is called immediately after the Columns are set up

configuringColumnSelect

This is called immediately prior to setting up Column Select

configuredColumnSelect

This is called immediately after setting up Column Select

rowsRetrieved

This is called immediately after the query is executed, and is passed the result from the executed query.

searchUpdated

This is called whenever the search is updated, and is passed the value that has been searched for

filterApplying

This is called whenever a Filter is applying

filterReset

This is called whenever a Filter is reset

filterSet

This is called whenever a Filter is set

filterUpdated

This is called whenever a Filter is updated/used

filterRemoved

This is called whenever a Filter is removed from the table

Use in Traits

To use these in a trait, allowing you to easily set defaults across multiple tables, you should ensure that you append the Lifecycle Hook with your trait name, e.g.

You can then add the trait to your tables, allowing you to centralise your defaults, and avoid code duplication.

trait StandardTableMethods
{

    public function configuringStandardTableMethods()
    {
        // Your standard configure() options go here, anything set here will be over-ridden by the configure() method
        // For Example
        $this->setColumnSelectDisabled();
    }

    public function configuredStandardTableMethods()
    {
        // Your standard configure() options go here, anything set here will override those set in the configure() method
        // For Example
        $this->setColumnSelectDisabled();
    }

}
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
milesj/emojibase
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