A Filament plugin that adds refresh functionality to tables.
You can install the package via composer:
composer require faizananwerali/filament-refresh-table
use FaizanAnwerAli\FilamentRefreshTable\FilamentRefreshTablePlugin;
class AdminPanelProvider extends PanelProvider
{
public function panel(Panel $panel): Panel
{
return $panel
->plugins([
FilamentRefreshTablePlugin::make(),
]);
}
}
use FaizanAnwerAli\FilamentRefreshTable\FilamentRefreshTablePlugin;
class AdminPanelProvider extends PanelProvider
{
public function panel(Panel $panel): Panel
{
return $panel
->plugins([
FilamentRefreshTablePlugin::make()->enabled(false),
]);
}
}
On table page, use trait.
<?php
namespace App\Filament\Resources\PostResource\Pages;
use App\Filament\Resources\PostResource;
use FaizanAnwerAli\FilamentRefreshTable\Concerns\HasRefreshableTable;
use Filament\Actions;
use Filament\Resources\Pages\ListRecords;
class ListPosts extends ListRecords
{
use HasRefreshableTable;
protected static string $resource = PostResource::class;
protected function getHeaderActions(): array
{
return [
Actions\CreateAction::make(),
];
}
}
The MIT License (MIT).