© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
3 replies
Frans

Add a table in a custom filament page using table builder

Good day! I am new to filament and I want to display a table in a custom filament page using the table builder. However I am getting an error:
Argument #1 ($table) must be of type Filament\Tables\Table, Filament\Infolists\Infolist given, called vendor\filament\infolists\src\Concerns\InteractsWithInfolists.php
Argument #1 ($table) must be of type Filament\Tables\Table, Filament\Infolists\Infolist given, called vendor\filament\infolists\src\Concerns\InteractsWithInfolists.php


Custom Page:
namespace App\Filament\Pages;

use Filament\Pages\Page;
use Filament\Tables\Table;
use App\Models\MalasakitSummary;
use Filament\Tables\Columns\TextColumn;

class MalasakitDashboard extends Page
{
    protected static string $view = 'filament.pages.malasakit-dashboard';

    protected static ?string $title = 'Malasakit Dashboard';
    protected static ?string $navigationLabel = 'Dashboard';
    protected static ?string $slug = 'malasakit-centers/dashboard';
    protected ?string $heading = 'Malaskit Dashboard';
    protected static ?string $navigationGroup = 'Malasakit';

    public static function table(Table $table): Table
    {
        return $table
            ->query(MalasakitSummary::query())
            ->columns([
                TextColumn::make('name')
                    ->label('Name'),
            ]);
    }
}
namespace App\Filament\Pages;

use Filament\Pages\Page;
use Filament\Tables\Table;
use App\Models\MalasakitSummary;
use Filament\Tables\Columns\TextColumn;

class MalasakitDashboard extends Page
{
    protected static string $view = 'filament.pages.malasakit-dashboard';

    protected static ?string $title = 'Malasakit Dashboard';
    protected static ?string $navigationLabel = 'Dashboard';
    protected static ?string $slug = 'malasakit-centers/dashboard';
    protected ?string $heading = 'Malaskit Dashboard';
    protected static ?string $navigationGroup = 'Malasakit';

    public static function table(Table $table): Table
    {
        return $table
            ->query(MalasakitSummary::query())
            ->columns([
                TextColumn::make('name')
                    ->label('Name'),
            ]);
    }
}


View:
<x-filament-panels::page>
    {{ $this->table }}
</x-filament-panels::page>
<x-filament-panels::page>
    {{ $this->table }}
</x-filament-panels::page>


Should I use other ways to do this such as livewire component, table widget, or hard coding a table then pass the data?

Thank you.
Solution
I think you need to implements HasTable like this
use Filament\Tables\Contracts\HasTable;
use Filament\Tables\Concerns\InteractsWithTable;

class MalasakitDashboard extends Page implements HasTable
{
    use InteractsWithTable;

    // ...
}
use Filament\Tables\Contracts\HasTable;
use Filament\Tables\Concerns\InteractsWithTable;

class MalasakitDashboard extends Page implements HasTable
{
    use InteractsWithTable;

    // ...
}
Jump to solution
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Custom View Page using Filament Table Builder
FilamentFFilament / ❓┊help
3y ago
Filament table builder using union query
FilamentFFilament / ❓┊help
2y ago
Problem using Wizard in Custom Filament Page
FilamentFFilament / ❓┊help
2y ago
Form and Table in Custom page Filament v4
FilamentFFilament / ❓┊help
5mo ago