Skip to main content
Tutorial Free

Filament: Add Navigation Link to External URL

April 04, 2024
1 min read

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.

Enjoyed This Tutorial?

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

Recent Courses on Laravel Daily

Laravel 13 Starter Kit Teams and Customizations

10 lessons
33 min

Roles and Permissions in Laravel 13

14 lessons
57 min

Queues in Laravel 13

18 lessons
1 h 12 min read
Khairul Imran avatar

How to add custom link to NavigationGroup ?

ostrunck avatar

... ->group('Groupname') ...

jo avatar

Hello, how can I add a navigation item to the dashboard of another panel with id = "foo" ?

I've tried with
NavigationItem::make('Foo')
->url(route('filament.foo.pages.dashboard'))
->sort(1000),

but got an exception "Route [filament.foo.pages.dashboard] not defined."

Tx for your precious help...

We'd Love Your Feedback

Tell us what you like or what we can improve

Feel free to share anything you like or dislike about this page or the platform in general.