🚀 Refactor Livewire tables: update PowerGrid imports, replace deprecated methods, and enable WithExport trait for improved maintainability.

This commit is contained in:
HolgerHatGarKeineNode
2026-01-18 21:21:53 +01:00
parent 7db9c04505
commit 00707797e5
2 changed files with 20 additions and 15 deletions

View File

@@ -7,25 +7,29 @@ use Illuminate\Database\Eloquent\Builder;
use Illuminate\Support\Carbon;
use PowerComponents\LivewirePowerGrid\Button;
use PowerComponents\LivewirePowerGrid\Column;
use PowerComponents\LivewirePowerGrid\Exportable;
use PowerComponents\LivewirePowerGrid\Components\SetUp\Exportable;
use PowerComponents\LivewirePowerGrid\Facades\Filter;
use PowerComponents\LivewirePowerGrid\Facades\PowerGrid;
use PowerComponents\LivewirePowerGrid\Facades\Rule;
use PowerComponents\LivewirePowerGrid\Footer;
use PowerComponents\LivewirePowerGrid\PowerGrid;
use PowerComponents\LivewirePowerGrid\PowerGridComponent;
use PowerComponents\LivewirePowerGrid\PowerGridFields;
use PowerComponents\LivewirePowerGrid\Traits\WithExport;
final class MeetupTable extends PowerGridComponent
{
use WithExport;
public string $tableName = 'meetup-table';
public function setUp(): array
{
$this->showCheckBox();
return [
Exportable::make('export')
PowerGrid::exportable('export')
->striped()
->type(Exportable::TYPE_XLS, Exportable::TYPE_CSV),
Footer::make()
PowerGrid::footer()
->showPerPage(perPage: 25)
->showRecordCount(),
];