Filament v3 Custom Global Search Providers | Mohamed Said       [Skip to content](#main)  [ ![](https://cdn.msaied.com/01KT78WE565VEMM3PSNQAAB0MH.png) Mohamed SaidLaravel Backend Engineer ](https://www.msaied.com/public) - [Home](https://www.msaied.com/public)
- [Projects](https://www.msaied.com/public/projects)
- [Articles](https://www.msaied.com/public/articles)
- [Certificates](https://www.msaied.com/public/certificates)
- [About](https://www.msaied.com/public#about)

           [  Contact](https://www.msaied.com/public#contact) Menu 

Menu
----

Close 

 - [HomeStart here](https://www.msaied.com/public)
- [ProjectsCase studies](https://www.msaied.com/public/projects)
- [ArticlesEngineering notes](https://www.msaied.com/public/articles)
- [CertificatesCredentials](https://www.msaied.com/public/certificates)
- [AboutHow I work](https://www.msaied.com/public#about)
- [ContactGet in touch](https://www.msaied.com/public#contact)

  [Start a conversation](https://www.msaied.com/public#contact) [WhatsApp](https://wa.me/201094619204) [Email](mailto:hello@msaied.com) 

 1. [Home](https://www.msaied.com/public)
2. /
3. [Articles](https://www.msaied.com/public/articles)
4. /
5. Filament v3 Global Search: Custom Result Providers and Scoped Tenant Isolation

 Filament v3 Global Search: Custom Result Providers and Scoped Tenant Isolation
===============================================================================

 Learn how to register custom global search providers in Filament v3, scope results to the current tenant, and surface non-Eloquent data — all without touching core internals.

 ![](https://cdn.msaied.com/01M22N44A70A5MC2S599JP0MPH.webp) [Mohamed Said](https://www.msaied.com/public#person) Published 14 Jun 2026 · Updated 14 Jun 2026 · 1 min read

ShareCopy linkCopied

 ![Filament v3 Global Search: Custom Result Providers and Scoped Tenant Isolation](https://cdn.msaied.com/165/4de273593ea2005169698edc5cc53d6b.png) 

  On this page +1. [The Problem With Default Global Search in Multi-Tenant Panels](#the-problem-with-default-global-search-in-multi-tenant-panels)
2. [How Filament Resolves Search Results](#how-filament-resolves-search-results)
3. [Building a Tenant-Scoped Provider](#building-a-tenant-scoped-provider)
4. [The globalSearch Local Scope](#the-codeglobalsearchcode-local-scope)
5. [Testing the Provider in Isolation](#testing-the-provider-in-isolation)
6. [Key Takeaways](#key-takeaways)

 The Problem With Default Global Search in Multi-Tenant Panels
-------------------------------------------------------------

Filament's built-in global search is powered by `GloballySearchable` on your Eloquent resources. Drop the trait on a resource, define `getGlobalSearchResultTitle()`, and you're done — until you're running a multi-tenant SaaS.

The moment you have multiple tenants sharing a panel, the default implementation will happily return results across **every tenant's data** unless you've already applied a global scope. Even then, surfacing results from non-Eloquent sources (an Elasticsearch index, a Redis cache, a third-party API) is simply not possible through the trait alone.

This article shows you how to register a fully custom `GlobalSearchProvider`, scope it to the authenticated tenant, and keep it testable.

---

How Filament Resolves Search Results
------------------------------------

Filament's `GlobalSearch` Livewire component calls `FilamentManager::getGlobalSearchResults(string $query)`. Internally it iterates over every registered resource that implements `HasGlobalSearch` and merges their result collections.

What most developers miss: you can **replace** that resolution entirely by binding your own implementation to the `GlobalSearch` contract in a service provider.

```php
// app/Providers/AppServiceProvider.php
use Filament\GlobalSearch\Contracts\GlobalSearchProvider;
use App\Search\TenantAwareSearchProvider;

public function register(): void
{
    $this->app->bind(GlobalSearchProvider::class, TenantAwareSearchProvider::class);
}

```

---

Building a Tenant-Scoped Provider
---------------------------------

```php
