© 2026 Hedgehog Software, LLC

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

Cannot use accessor for record title in global search

According to the docs (https://filamentphp.com/docs/3.x/panels/resources/getting-started#record-titles) I should be able to use accessors as the record title in global search. When I try this however I still get exceptions that the given title does not exist on the MySql table.

This is the code I'm using currently. Using fullName has the same result.

// App\Filament\Resources\UserResource.php

protected static ?string $recordTitleAttribute = 'full_name';
// App\Filament\Resources\UserResource.php

protected static ?string $recordTitleAttribute = 'full_name';


// App\Models\User.php

public function fullName(): Attribute
    {
        return new Attribute(fn () => trim("$this->first_name $this->last_name"));
    }
// App\Models\User.php

public function fullName(): Attribute
    {
        return new Attribute(fn () => trim("$this->first_name $this->last_name"));
    }


What could be going on here? This is happening on Filament
v3.1.1
v3.1.1
and still after bumping to the
.10
.10
release.

Thanks in advance!
Getting started - Panel Builder - Filament
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

Use Accessor in Global Search
FilamentFFilament / ❓┊help
3y ago
Global search title
FilamentFFilament / ❓┊help
15mo ago
Override Global Search's category title
FilamentFFilament / ❓┊help
3y ago
Record title in breadcrumb
FilamentFFilament / ❓┊help
3y ago