Skip to content

Commit 10dbe5e

Browse files
committed
Customize repository title in global search response
1 parent f584cc4 commit 10dbe5e

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

docs-v2/content/en/search/basic-filters.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,19 @@ public function subtitle(): ?string
9595
}
9696
```
9797

98+
The `repositoryTitle` could be customized by overriding the `label` method or by defining the `$label` property. This will customize the displayed repository title in the global search response:
99+
100+
```php
101+
// UserRepository.php
102+
public static string $label = 'Custom Repository Title';
103+
104+
// Or using the label method for dynamic titles:
105+
public static function label(): string
106+
{
107+
return 'Dynamic Title';
108+
}
109+
```
110+
98111
## Repository Search
99112

100113
The repository search works in a similar way as [global search](#global-search), however in this case the endpoint refers to the repository and the search will be applied for a certain repository.

0 commit comments

Comments
 (0)