© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
4 replies
exactwebitesolutions

Render table component without a view

Is it possible to build a Filament table without a view file?

Tried using Blade render but getting error:
Using $this when not in object context
From inside
<x-filament-tables::reorder.handle />
<x-filament-tables::reorder.handle />


class ListExamples extends Component implements HasForms, HasTable
{
    use InteractsWithTable;
    use InteractsWithForms;

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

    public function render(): string
    {
        return Blade::render(<<<'BLADE'
<div>
    {{ $table }}
</div>
BLADE, ['table' => $this->table]);
    }
}
class ListExamples extends Component implements HasForms, HasTable
{
    use InteractsWithTable;
    use InteractsWithForms;

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

    public function render(): string
    {
        return Blade::render(<<<'BLADE'
<div>
    {{ $table }}
</div>
BLADE, ['table' => $this->table]);
    }
}
Solution
You can also just return the HTML:
    public function render()
    {
        return $this->table->toHtml();
    }
    public function render()
    {
        return $this->table->toHtml();
    }
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

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Render Livewire Directly using the View component
FilamentFFilament / ❓┊help
3y ago
Showing table in a Livewire's component view
FilamentFFilament / ❓┊help
3y ago
Is it possible to render a table component inside a form component?
FilamentFFilament / ❓┊help
3y ago
Open view modal on table row click without `ViewAction` in `recordActions()`
FilamentFFilament / ❓┊help
7mo ago