This plugin allows you to customize the rendering of components based on specific scopes.
To define a custom scope for rendering, use the scopes() method. For example, you can pass a resource:
use CharrafiMed\GlobalSearchModal\GlobalSearchModalPlugin; public function panel(Panel $panel): Panel { return $panel ->plugins([ GlobalSearchModalPlugin::make() ->scopes(UserResource::class) ]); }
Here, UserResource::class is passed as a scope, and the plugin will render only when this scope is active.
UserResource::class
You can also pass multiple scopes as an array:
use CharrafiMed\GlobalSearchModal\GlobalSearchModalPlugin; public function panel(Panel $panel): Panel { return $panel ->plugins([ GlobalSearchModalPlugin::make() ->scopes([UserResource::class, PostResource::class]) ]); }
No Results Found
Please enter a search term to get started.