© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•13mo ago•
16 replies
foggy

Newb question: populating table based on query

Hi all - kinda new to Filament, been hacking around with Lara/Livewire for a while, now starting to migrate my app over to Filament bit by bit learning as I go. I'm calling Filament parts as Livewire components.

My app is multi-tenanted. Objects in various databases belong to 'organisations' or other groupings. In Lara/Livewire, I'd pass the collection into the Livewire component based off a query $users=User::where('organisation',Session::get('currentOrg'))->get();

The Filament code I'm working off looks like this:

        return $table
            ->query(User::query())
            ->columns([
                TextColumn::make('name')
                    ->searchable(isIndividual: true, isGlobal: false)
                    ->sortable()
                    ->label('Full Name'),
                TextColumn::make('email')
                    ->label('Email Address')
                    ->searchable(isIndividual: true, isGlobal: false)
                    ->sortable(),
        return $table
            ->query(User::query())
            ->columns([
                TextColumn::make('name')
                    ->searchable(isIndividual: true, isGlobal: false)
                    ->sortable()
                    ->label('Full Name'),
                TextColumn::make('email')
                    ->label('Email Address')
                    ->searchable(isIndividual: true, isGlobal: false)
                    ->sortable(),


Clearly, it's returning a table with all the users in the database. How do I filter that to just those records where the organisation field = whatever?

Everything I google for this seems to give me quite complex answers, but my spidey sense tells me there's a simpler way.. TIA..
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

Update table filters based on search query?
FilamentFFilament / ❓┊help
3y ago
Table list edit query based on certain conditions
FilamentFFilament / ❓┊help
2y ago
Auto-populating a repeater based on another field
FilamentFFilament / ❓┊help
2y ago
Question mark on table
FilamentFFilament / ❓┊help
3y ago