@LaryAI tried to help but failed ;-)
How to scope render hook to one panel only
Hey!
I want to scope my render hook just to guest users that are using AppPanelProvider only.
I register my render hook in AppPanelProvider like so:
class AppPanelProvider extends PanelProvider { public function panel(Panel $panel): Panel { FilamentView::registerRenderHook( name: PanelsRenderHook::TOPBAR_END, hook: fn (): View => view('filament.app.topbar-login-redirect'), scopes: ? ); But I can not figure out how to use the scope and stop it from showing on other panels?
My panels are:
AdminPanelProvider - admin user AppPanelProvider - guest users UserPanelProvider - logged in users
Thanks!
There is nothing more satisfying then responding to own question with solution found in documentation :laughing:
https://filamentphp.com/docs/3.x/panels/configuration#render-hooks
Thanks!
Please or to participate in this conversation.