Add Elements to the TopMenu

I would love to add elements in the top menu. Did anyone find a way to edit that? (not talking about the user/setting neither the search function).
No description
Solution:
Hi, You can use render hook TOPBAR_START Example here with AUTH_REGISTER_FORM_BEFORE : https://filamentmastery.com/articles/filament-render-hooks-example-with-authentication-pages...
Filament Mastery
Filament Render Hooks: example with authentication pages - Filament...
Learn how to customize Filament panels using Render Hooks. Discover the power of clean and maintainable customizations in Filament!
Jump to solution
6 Replies
Solution
Julien B. (aka yebor974)
Hi, You can use render hook TOPBAR_START Example here with AUTH_REGISTER_FORM_BEFORE : https://filamentmastery.com/articles/filament-render-hooks-example-with-authentication-pages
Filament Mastery
Filament Render Hooks: example with authentication pages - Filament...
Learn how to customize Filament panels using Render Hooks. Discover the power of clean and maintainable customizations in Filament!
Julien B. (aka yebor974)
Example :
FilamentView::registerRenderHook(
PanelsRenderHook::TOPBAR_START,
fn (): string => Blade::render('<x-filament::link href="' . config('app.url') . '" target="_blank" icon="heroicon-o-arrow-top-right-on-square">View Public Area</x-filament::link>'),
);
FilamentView::registerRenderHook(
PanelsRenderHook::TOPBAR_START,
fn (): string => Blade::render('<x-filament::link href="' . config('app.url') . '" target="_blank" icon="heroicon-o-arrow-top-right-on-square">View Public Area</x-filament::link>'),
);
LordOfDrols
LordOfDrolsOP4w ago
Oh nice. That seems like to be it. Looked for 45 min. Let me check if that works
Julien B. (aka yebor974)
you can register it directly on you panel provider too
LordOfDrols
LordOfDrolsOP4w ago
That would organize it a bit better that in the AppServiceProvider. Thnaks

Did you find this page helpful?