Filament: Add Navigation Link to External URL

Sometimes you may want to add a simple link to your main sidebar, like "Terms and Conditions" or similar. It's easy to do in Filament.

You just need to add the navigationItems() method to the main panel() method in the AdminPanelProvider file.

app/Providers/Filament/AdminPanelProvider.php:

// ...
use Filament\Navigation\NavigationItem;
 
class AdminPanelProvider extends PanelProvider
{
public function panel(Panel $panel): Panel
{
return $panel
// ... other methods ->xxxxx()
->navigationItems([
NavigationItem::make('About us')
->url('https://laraveldaily.com', shouldOpenInNewTab: true)
->icon('heroicon-o-link')
]);
}
}

And that's it! Here's the visual result:

Read more about navigation customization in the official Filament docs.

Looking for a specific icon for the menu item? Here's the Blade UI Kit list to search from.


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

No comments or questions yet...

Like our articles?

Become a Premium Member for $129/year or $29/month
What else you will get:
  • 59 courses (1057 lessons, total 42 h 44 min)
  • 78 long-form tutorials (one new every week)
  • access to project repositories
  • access to private Discord

Recent Premium Tutorials