Skip to content

Livewire PowerGridData tables for Laravel Livewire

Tabs, filters, search, inline editing and export from a single PHP class. Tailwind, DaisyUI or Flux.

From zero to a table in three steps ​

Install the package, generate a component, drop it in a view.

Installcomposer require power-components/livewire-powergrid
Createphp artisan powergrid:create
Render<livewire:dish-table />

One class, the whole table ​

Columns, tabs, filters and actions live in a single Livewire component. No JavaScript to write.

  • Tabs scope the query and count rows for the badge
  • Searchable and sortable columns in one chain
  • Toggles and click-to-edit save through your own code
  • Filters render inline, in a dropdown or in a flyout

Create your first table

phpapp/Livewire/DishTable.php
public function setUp(): array
{
    return [
        PowerGrid::tabs()
            ->add('all', label: 'All')
            ->add('sold_out', label: 'Sold out',
                scope: ['in_stock', false]),
        PowerGrid::header()->showSearchInput(),
    ];
}

public function columns(): array
{
    return [
        Column::make('Name', 'name')->searchable()->sortable(),
        Column::make('Price', 'price')->sortable(),
        Column::make('Stock', 'in_stock')->toggleable(),
    ];
}

Ready to build your first table?

Free and open source. MIT licensed.

Created By Luan Freitas and @DanSysAnalyst