Conditional globalSearch #12886
aotearoait
started this conversation in
Ideas
Replies: 2 comments
-
I agree with this. Would like to disable global search for some users and not others. |
Beta Was this translation helpful? Give feedback.
0 replies
-
class MyPanelProvider extends PanelProvider
{
public function panel(Panel $panel): Panel
{
$panel->globalSearch(true/false);
... |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Most settings in the panel are able to be conditionally set, eg ->tenantMenu(auth()->user()->isAdmin())
But the global search does not accept closures.
I cannot find a way to do with middleware either as it just gets overriden.
So the request is to allow closures for globalSearch()
Beta Was this translation helpful? Give feedback.
All reactions