Global search
The search field in the topbar searches all resources of the panel that name search columns:
protected array $globalSearch = ['name', 'company', 'email'];
// Optional: second line of a hit.public function globalSearchDescription(array|object $record): ?string{ $company = Record::get($record, 'company');
return is_string($company) ? $company : null;}Behaviour
Section titled “Behaviour”- The field is shown when at least one resource of the panel takes part.
Ctrl+K/⌘Kfocuses it, arrow keys and Enter open a hit. - Searches start with two characters (at most 100).
- Words are joined with OR, a phrase in quotes stays together and
*is a wildcard, like the search of lists;%and_are matched literally. - Up to five hits per resource, ordered by the first search column, shown under the plural label of the resource with the record title and the description.
- A hit opens the detail page.
Security
Section titled “Security”- Only resources the user may list (
<slug>.view) are searched. - The query is the query of the list: tenant and
scopeQuery(). - Every hit is checked with
canView()(policies); hidden records are left out. - Columns are plain column names of the main table
(
[a-z_][a-z0-9_]*); others are ignored. Choose columns that are not confidential, because their values become findable.