© 2026 Hedgehog Software, LLC

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

Any way to add filter to global search?

Not sure if I selected the right tag, but is there any way to add a search filter to global search? I have organizations set and would like to filter results of global search to remain within that organization. I've attempted the following function, which produces an empty result, but clicking it still links to the hidden result.

public static function getGlobalSearchResultTitle(Model $record): string|Htmlable
    {

        if($record['organizations_id'] == auth()->user()->organizations_id)
        {
            return $record['name'];
        }
        return '';
    }
public static function getGlobalSearchResultTitle(Model $record): string|Htmlable
    {

        if($record['organizations_id'] == auth()->user()->organizations_id)
        {
            return $record['name'];
        }
        return '';
    }
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

Cannot Add Actions To Global Search Results
FilamentFFilament / ❓┊help
5mo ago
Global search
FilamentFFilament / ❓┊help
2y ago
Global Search
FilamentFFilament / ❓┊help
3y ago