Skip to main content
Tutorial Free

Filament: Add Theme Footer with Render Hooks

September 19, 2023
2 min read

Filament admin panel template comes without the footer in the design. What if you want to add your "copyright" text or something similar in the footer? Let me show you how to do it.

Your choice should be to use template hooks. It's the fastest way to add a footer to the Filament panel.


Adding The Footer

To add a footer, we have to modify our PanelProvider file:

app/Providers/Filament/AdminPanelProvider.php

public function panel(Panel $panel): Panel
{
return $panel
// ...
->renderHook(
// This line tells us where to render it
'panels::body.end',
// This is the view that will be rendered
fn () => view('customFooter'),
);
}

Next, we will simply create the View file:

resources/views/customFooter.blade.php

<footer class="fixed bottom-0 left-0 z-20 w-full p-4 bg-white border-t border-gray-200 shadow md:flex md:items-center md:justify-between md:p-6 dark:bg-gray-800 dark:border-gray-600">
<span class="text-sm text-gray-500 sm:text-center dark:text-gray-400">© 2023
<a href="#" class="hover:underline">Your Site™</a>. All Rights Reserved.
</span>
</footer>

That's it! Loading the page will now have a sticky footer for you to use.


If you want more Filament examples, you can find more real-life projects on our FilamentExamples.com.

Enjoyed This Tutorial?

Get access to all premium tutorials, video and text courses, and exclusive Laravel resources. Join our community of 10,000+ developers.

Comments & Discussion

CB
Caspar Bisschop ✓ Link copied!

Love this one. thank you

N
novobyte ✓ Link copied!

Thanks! I don't like the "new v3 transparent" background of sidebar in desktop mode. It can be changed using render hooks ?

M
Modestas ✓ Link copied!

I think that the best option could be one of the following:

  1. Modify the CSS of the sidebar to make it different
  2. Custom theme that would solve sidebar issue

Hooks are more to add additional content into the theme and not modify what the theme looks like

FC
Firman Canva ✓ Link copied!

out of title post, i have question about crash style panel filament, any solution ? https://prnt.sc/f4HvWJM4A5Ex