PHP code example of faizananwerali / filament-refresh-table

1. Go to this page and download the library: Download faizananwerali/filament-refresh-table library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

faizananwerali / filament-refresh-table example snippets


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),
            ]);
    }
}



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(),
        ];
    }
}