Skip to main content
These examples assume FLEX Theme is installed and its theme assets are configured in your panel.
Search is enabled by default in the plugin. FlexThemePlugin::make()->search() explicitly selects that same default configuration. Enable or disable it in PHP; Theme Settings contains search preferences, not an activation switch.

Make a resource searchable

Register the resource with the panel as usual. Its native global-search eligibility and policies still apply. The theme does not make an unregistered resource available automatically.

Add explicit configuration

Values passed through SearchConfiguration::settings() are validated and locked in the corresponding Theme Settings controls. Omit a value when administrators should be able to change it.

Open search from your own button

The event also accepts a registered source ID. Use a custom source’s stable ID or NativeResourceSource::make(CustomerResource::class)->id() rather than hardcoding the internal resource hash.
This disables the FLEX replacement. To disable native search as well, configure the panel with ->globalSearch(false). If you want FLEX commands without a native provider, see Commands. Next: resources, actions, or the complete settings reference.