Global Search
Global search adds a shell-level search input to the Adminix sidebar. It is configured server-side and searches only explicitly declared resources.
Use it for fast admin navigation across known resources, not as a replacement for per-list filters or application search pages.
Panel Configuration
When at least one resource is configured, Adminix renders a search input in the sidebar. Typing sends GET /{panel}/api/global-search?q=.... Results are grouped by resource title and clicking a result opens the server-built URL.
Rendered example:

Legacy Config
Legacy configuration can use arrays:
Panel-level configuration can also provide global_search.resources or global_search_resources.
Resource Contract
name()is a stable resource key used in the JSON payload.title()is the visible group label.dataSource()accepts an Eloquent model class or table name.searchFields()accepts direct datasource columns only.titleField()is required and becomes the visible result title.descriptionField()is optional supporting text.criteria()is applied server-side before search.limit()is capped between 1 and 25 per resource.minLength()defaults to 2 characters.adminixUri(),url(), orurlUsing()should build the result URL.
Placeholders such as {id} or {number} are replaced from the matched row and URL-encoded.
Use urlUsing() when the destination depends on application logic:
Security
Global search is opt-in. Adminix does not scan all pages, models, or list modules automatically.
Keep tenant, owner, and permission limits in criteria() or in a server-owned URL resolver. Do not expose sensitive fields as searchFields(), titleField(), or descriptionField(). The browser can send only a query string; datasource, fields, criteria, limits, and result URLs are derived from package configuration.
Search text is length-capped and SQL LIKE wildcards are escaped. Invalid resource configuration returns a controlled JSON error instead of a 500 response.
Doctor
php artisan adminix:doctor --strict validates global search resources:
resource shape and name;
datasource model/table;
direct column identifiers;
required search fields and title field;
known table columns when the table is available;
presence of
url(),adminixUri(), orurlUsing().