Hide Site Search for a user role
I have a role that doesn't have access to anything really and I'd like to hide the global search for them without needing to go into 20+ resources and restricting them.
->globalSearch(false);
Auth isn't initialize at this point so I'm unable to check for a user role.1 Reply
Try wrapping in a closure like
->globalSearch(fn() => ...)