© 2026 Hedgehog Software, LLC

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

how to make filament table row clickable to model view page

I have a search Page which used filament table for user. I also have UserResource for users.
How to make table row clickable to user view page.

class Search extends Page implements Tables\Contracts\HasTable
{
    use Tables\Concerns\InteractsWithTable;
    ... 
    protected function getTableColumns(): array 
    {
        return [
                Tables\Columns\TextColumn::make('name')
                    ->searchable()
                    ->placeholder('-'),
                Tables\Columns\TextColumn::make('contact_number')
                    ->searchable(),
       ];
   }

    protected function getTableRecordActionUsing(): ?Closure
    {
        // I need help here, how to make it open ViewUser page in UserResource.
    }
    protected function getTableQuery(): Builder 
    {
        return User::query()
            ->whereIn('pincode', $pincode_array);
    }
}
class Search extends Page implements Tables\Contracts\HasTable
{
    use Tables\Concerns\InteractsWithTable;
    ... 
    protected function getTableColumns(): array 
    {
        return [
                Tables\Columns\TextColumn::make('name')
                    ->searchable()
                    ->placeholder('-'),
                Tables\Columns\TextColumn::make('contact_number')
                    ->searchable(),
       ];
   }

    protected function getTableRecordActionUsing(): ?Closure
    {
        // I need help here, how to make it open ViewUser page in UserResource.
    }
    protected function getTableQuery(): Builder 
    {
        return User::query()
            ->whereIn('pincode', $pincode_array);
    }
}


search.blade.php
<x-filament::page>
<form wire:submit.prevent="submit">
    {{ $this->form }}
    </br>
    <x-filament::button type="submit">Search</x-filament::button>
</form>

<div>
    {{ $this->table }}
</div>
</x-filament::page>
<x-filament::page>
<form wire:submit.prevent="submit">
    {{ $this->form }}
    </br>
    <x-filament::button type="submit">Search</x-filament::button>
</form>

<div>
    {{ $this->table }}
</div>
</x-filament::page>
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

Clickable row on custom page table
FilamentFFilament / ❓┊help
3y ago
Struggling on the simplest thing :( - How do I make a table row clickable to a modal view page?
FilamentFFilament / ❓┊help
2y ago
Make single row not clickable
FilamentFFilament / ❓┊help
3y ago
Count when click on table row to view model
FilamentFFilament / ❓┊help
3y ago