---
title: Navigation
published: 2026-10-14
lastmod: 2026-10-14
url: https://larasell.dev/docs/admin/navigation
---

## Table of contents
- [Adding items](#adding-items)
- [Positioning items](#positioning-items)
- [Placing items relatively](#placing-items-relatively)

# Navigation

Larasell allows you to add items to the sidebar navigation of the admin panel.

## Adding items

First, create a `routes/admin.php` file, if it does not exist.

Use the `Navigation`{href="https://raw.githubusercontent.com/Larasell-dev/admin/refs/heads/main/src/Facades/Navigation.php"} facade inside `routes/admin.php` to add an item to the sidebar. Each item needs a label and a route:

```php
use Larasell\Admin\Facades\Navigation;

Route::get('notes', NotesController::class)->name('notes');

Navigation::add('Notes', 'larasell.admin.notes');
```

The route group inside `routes/admin.php` prefixes route names with
`larasell.admin.`, so `notes` becomes `larasell.admin.notes`. Pass the full
route name to the facade.

## Positioning items

By default, the panel appends items to the bottom of the navigation.
To control where an item appears, set an explicit position using the `position` method:

```php
Navigation::add('Notes', 'larasell.admin.notes')->position(500);
```

The panel sorts items by position in ascending order.

## Placing items relatively

Instead of setting a numeric position, you can place an item before or after an existing one. The
target can be a label or a `NavItem`{href="https://raw.githubusercontent.com/Larasell-dev/admin/refs/heads/main/src/Enums/NavItem.php"} enum case:

```php
use Larasell\Admin\Enums\NavItem;
use Larasell\Admin\Facades\Navigation;

Navigation::add('Notes', 'larasell.admin.notes')->before('Home');
Navigation::add('Reports', 'larasell.admin.reports')->after(NavItem::Home);
```
