Filament v3 Custom Global Search Providers | Mohamed Said        [  ![Mohamed Said](https://cdn.msaied.com/01KT78WE565VEMM3PSNQAAB0MH.png)   Mohamed Said Laravel Backend Engineer  ](https://www.msaied.com) [ Home ](https://www.msaied.com) [ Projects ](https://www.msaied.com/projects) [ Articles  ](https://www.msaied.com/articles) [ Certificates ](https://www.msaied.com/certificates) [ Contact ](https://www.msaied.com#contact-section) 

       [  ](https://github.com/EG-Mohamed)       

 [ Home ](https://www.msaied.com) [ Projects ](https://www.msaied.com/projects) [ Articles ](https://www.msaied.com/articles) [ Certificates ](https://www.msaied.com/certificates) [ Contact ](https://www.msaied.com#contact-section) 

  [ home ](https://www.msaied.com)    [ articles ](https://www.msaied.com/articles)    Filament v3 Global Search: Custom Result Providers and Scoped Tenant Isolation        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)

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

  #filament   #laravel   #multi-tenant   #search  

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

     14 Jun 2026      1 min read    ![Mohamed Said](https://cdn.msaied.com/01KT78WE565VEMM3PSNQAAB0MJ.jpg)  Mohamed Said  

       Table of contents

1. [  01   The Problem With Default Global Search in Multi-Tenant Panels  ](#the-problem-with-default-global-search-in-multi-tenant-panels)
2. [  02   How Filament Resolves Search Results  ](#how-filament-resolves-search-results)
3. [  03   Building a Tenant-Scoped Provider  ](#building-a-tenant-scoped-provider)
4. [  04   The globalSearch Local Scope  ](#the-codeglobalsearchcode-local-scope)
5. [  05   Testing the Provider in Isolation  ](#testing-the-provider-in-isolation)
6. [  06   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
