F
Filament10mo ago
Hugo

Render hook not working for 'panels:sidebar-nav.start'

Hello, Im trying to add a search option on top of my sidebar. For it, im tryng to render the following hook:
->renderHook('panels::sidebar-nav.start', fn() => view('tables.sidebar-search'))
->renderHook('panels::sidebar-nav.start', fn() => view('tables.sidebar-search'))
` this is in my AdminPanelProvider. I've rendered some hooks before and they are still working fine but I can't seem to be able to use this one. I tried using the sintax presented in the docs "PanelsRenderHook::SIDEBAR_NAV_START" https://filamentphp.com/docs/3.x/support/render-hooks#available-render-hooks, but is doesn't seem to work because apparently PanelsRenderHook doesn't exist. Anyone with the same problem?
1 Reply
johnnie_littleshoes
yes, me too, Class "Filament\View\Panels\PanelsRenderHook" not found. This works for me,
->renderHook(
name: 'panels::global-search.after',
hook: fn (): string => "Hello World!"
)
->renderHook(
name: 'panels::global-search.after',
hook: fn (): string => "Hello World!"
)
Want results from more Discord servers?
Add your server