PHPackages                             fuelviews/laravel-navigation - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. fuelviews/laravel-navigation

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

fuelviews/laravel-navigation
============================

Laravel navigation package

v2.0.5(5mo ago)11.4k1[8 PRs](https://github.com/fuelviews/laravel-navigation/pulls)MITBladePHP ^8.3CI passing

Since Jun 5Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/fuelviews/laravel-navigation)[ Packagist](https://packagist.org/packages/fuelviews/laravel-navigation)[ Docs](https://github.com/fuelviews/laravel-navigation)[ RSS](/packages/fuelviews-laravel-navigation/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (13)Versions (40)Used By (0)

Laravel Navigation Package
==========================

[](#laravel-navigation-package)

[![Latest Version on Packagist](https://camo.githubusercontent.com/eaa60be72ddc195224e92c4fc1fa61b4af726c18cc49a5e2405b38b8f29677d5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6675656c76696577732f6c61726176656c2d6e617669676174696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/fuelviews/laravel-navigation)[![GitHub Tests Action Status](https://camo.githubusercontent.com/30c3240b5cdf9edec82b73226828a9b4e9ad6204810a6ef1baf0d579bfd24083/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6675656c76696577732f6c61726176656c2d6e617669676174696f6e2f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/fuelviews/laravel-navigation/actions/workflows/run-tests.yml?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/5d58d8e5b0fcbf27d94de4262c1415392cca6893830fb3db91ffbebb9c08b348/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6675656c76696577732f6c61726176656c2d6e617669676174696f6e2f7068702d63732d66697865722e796d6c3f6c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/fuelviews/laravel-navigation/actions/workflows/php-cs-fixer.yml)[![Total Downloads](https://camo.githubusercontent.com/2a179decb0e5d9ea8e95f3e88ea8dfaafc9c26177636aedc98a8ec1698d3ee9e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6675656c76696577732f6c61726176656c2d6e617669676174696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/fuelviews/laravel-navigation)

A comprehensive and flexible Laravel navigation package that provides beautiful, responsive navigation components with Alpine.js interactions and Tailwind CSS styling. Perfect for building modern Laravel applications with professional navigation experiences.

📋 Requirements
--------------

[](#-requirements)

- PHP 8.3+
- Laravel 10.x, 11.x, or 12.x
- Alpine.js (included with Livewire)
- Tailwind CSS

🚀 Installation
--------------

[](#-installation)

Install the package via Composer:

```
composer require fuelviews/laravel-navigation
```

### Quick Setup

[](#quick-setup)

Run the install command for guided setup:

```
php artisan navigation:install
```

This will:

- Publish the configuration file
- Publish view files for customization
- Provide setup instructions

### Manual Setup

[](#manual-setup)

Alternatively, you can manually publish components:

```
# Publish configuration
php artisan vendor:publish --tag="navigation-config"

# Publish views (optional)
php artisan vendor:publish --tag="navigation-views"

# Publish service provider for advanced customization (optional)
php artisan vendor:publish --tag="laravel-package-tools-service-provider"
```

⚙️ Configuration
----------------

[](#️-configuration)

The package uses a comprehensive configuration file located at `config/navigation.php`:

### Navigation Items

[](#navigation-items)

Define your navigation structure with support for simple links and dropdown menus:

```
'navigation' => [
    // Simple link
    [
        'type' => 'link',
        'position' => 0,
        'name' => 'Home',
        'route' => 'home',
    ],

    // Dropdown menu
    [
        'type' => 'dropdown',
        'position' => 1,
        'name' => 'Services',
        'links' => [
            [
                'name' => 'Web Development',
                'route' => 'services.web',
            ],
            [
                'name' => 'Mobile Apps',
                'route' => 'services.mobile',
            ],
        ],
    ],
],
```

### Visual Configuration

[](#visual-configuration)

```
// logo config
'default_logo' => '',
'transparency_logo' => '',

// navigation config
'top_nav_enabled' => false,
'logo_swap_enabled' => true,
'transparent_nav_background' => true,

// logo shape config: 'horizontal', 'vertical', or 'square'
'default_logo_shape' => 'square',
'transparency_logo_shape' => 'horizontal',
```

### Pre-scrolled Routes

[](#pre-scrolled-routes)

Define routes that should have a "scrolled" appearance from page load:

```
'pre_scrolled_routes' => [
    'careers',
    'contact',
    'services',
    'forms.*',
    'sabhero-articles.*',
    'portfolio',
    'privacy-policy',
    'terms-and-conditions',
],
```

🧩 Components
------------

[](#-components)

### Desktop Navigation

[](#desktop-navigation)

```

```

### Mobile Navigation

[](#mobile-navigation)

```

```

### Navigation Wrapper

[](#navigation-wrapper)

```

```

### Utility Components

[](#utility-components)

```

```

🎯 Complete Navigation Example
-----------------------------

[](#-complete-navigation-example)

Here's a complete navigation setup:

```

    @vite(['resources/css/app.css', 'resources/js/app.js'])

    @if(Navigation::isTopNavEnabled())

    @endif

        {{ $slot }}

```

🎨 Styling with Tailwind CSS
---------------------------

[](#-styling-with-tailwind-css)

Add the package views to your `tailwind.config.js`:

```
module.exports = {
    content: [
        './resources/**/*.blade.php',
        './resources/**/*.js',
        './vendor/fuelviews/laravel-navigation/resources/**/*.blade.php',
    ],
    // ... rest of your config
}
```

🔧 Using the Navigation Facade
-----------------------------

[](#-using-the-navigation-facade)

Access navigation data programmatically:

```
use Fuelviews\Navigation\Facades\Navigation;

// Get all navigation items
$items = Navigation::getNavigationItems();

// Check if dropdown route is active
$isActive = Navigation::isDropdownRouteActive($dropdownLinks);

// Get configuration values
$logo = Navigation::getDefaultLogo();
$phone = Navigation::getPhone();
$isTransparent = Navigation::isTransparentNavBackground();

// Check route states
$isPreScrolled = Navigation::isPreScrolledRoute();
$preScrolledString = Navigation::getPreScrolledRoute(); // 'true' or 'false'
```

🛠️ Artisan Commands
-------------------

[](#️-artisan-commands)

### List Navigation Items

[](#list-navigation-items)

View all configured navigation items:

```
php artisan navigation:list
```

Output:

```
Navigation Items:

+----------+----------+---------+--------------+
| Position | Type     | Name    | Route/Links  |
+----------+----------+---------+--------------+
| 0        | link     | Home    | home         |
| 1        | dropdown | Services| 3 links      |
| 2        | link     | About   | about        |
+----------+----------+---------+--------------+

```

### Validate Configuration

[](#validate-configuration)

Validate your navigation configuration:

```
php artisan navigation:validate
```

This command checks for:

- Required fields (type, position, name)
- Valid navigation types
- Route existence
- Duplicate positions
- Dropdown structure integrity

🎛️ Advanced Usage
-----------------

[](#️-advanced-usage)

### Custom Navigation Items

[](#custom-navigation-items)

Add navigation items programmatically:

```
// In a service provider
config([
    'navigation.navigation' => array_merge(
        config('navigation.navigation'),
        [
            [
                'type' => 'link',
                'position' => 99,
                'name' => 'Admin',
                'route' => 'admin.dashboard',
            ]
        ]
    )
]);
```

### Custom View Components

[](#custom-view-components)

Extend the package with your own components:

```
// Create custom component
class CustomNavigationLink extends Component
{
    public function render()
    {
        return view('components.custom-navigation-link');
    }
}

// Register in AppServiceProvider
Blade::component('custom-nav-link', CustomNavigationLink::class);
```

🧪 Testing
---------

[](#-testing)

The package includes comprehensive tests. Run them with:

```
# In the package directory
composer test

# Code style
composer format
```

### Testing Your Navigation

[](#testing-your-navigation)

Test navigation in your application:

```
// Feature test example
public function test_navigation_renders_correctly()
{
    $response = $this->get('/');

    $response->assertSeeLivewire(DesktopNavigation::class);
    $response->assertSee('Home');
    $response->assertSee('Services');
}
```

🎨 Customization Examples
------------------------

[](#-customization-examples)

### Custom Dropdown Styling

[](#custom-dropdown-styling)

```

            Services

```

🤝 Contributing
--------------

[](#-contributing)

We welcome contributions! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for details.

### Development Setup

[](#development-setup)

```
git clone https://github.com/fuelviews/laravel-navigation.git
cd laravel-navigation
composer install
composer test
```

📄 Changelog
-----------

[](#-changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

🔐 Security Vulnerabilities
--------------------------

[](#-security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

👨‍💻 Credits
-----------

[](#‍-credits)

- [Joshua Mitchener](https://github.com/thejmitchener)
- [Sweatybreeze](https://github.com/sweatybreeze)
- [Fuelviews](https://github.com/fuelviews)
- [All Contributors](../../contributors)

📜 License
---------

[](#-license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

---

Built with ❤️ by the [Fuelviews](https://fuelviews.com) team

 [⭐ Star us on GitHub](https://github.com/fuelviews/laravel-navigation) • [📦 View on Packagist](https://packagist.org/packages/fuelviews/laravel-navigation)

###  Health Score

50

—

FairBetter than 95% of packages

Maintenance88

Actively maintained with recent releases

Popularity21

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 81.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~17 days

Total

31

Last Release

179d ago

Major Versions

v0.0.18 → v1.0.02025-01-30

v1.0.6 → v2.0.02025-08-20

PHP version history (4 changes)v0.0.1PHP ^8.2

v1.0.1PHP ^8.1||^8.2||^8.3||^8.4

v1.0.4PHP ^8.3

v1.0.5PHP ^8.3||^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/dd4a27681d2fe0a911a7c32f6ce4a54822748a6443892a27d7f6c651370559d8?d=identicon)[fuelviews](/maintainers/fuelviews)

---

Top Contributors

[![thejmitchener](https://avatars.githubusercontent.com/u/64335706?v=4)](https://github.com/thejmitchener "thejmitchener (88 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (14 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (3 commits)")[![sweatybreeze](https://avatars.githubusercontent.com/u/67076156?v=4)](https://github.com/sweatybreeze "sweatybreeze (3 commits)")

---

Tags

laravelnavigationFuelviews

###  Code Quality

TestsPest

Static AnalysisRector

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/fuelviews-laravel-navigation/health.svg)

```
[![Health](https://phpackages.com/badges/fuelviews-laravel-navigation/health.svg)](https://phpackages.com/packages/fuelviews-laravel-navigation)
```

###  Alternatives

[leandrocfe/filament-apex-charts

Apex Charts integration for Filament PHP.

4861.2M8](/packages/leandrocfe-filament-apex-charts)[spatie/laravel-livewire-wizard

Build wizards using Livewire

4061.0M4](/packages/spatie-laravel-livewire-wizard)[ralphjsmit/livewire-urls

Get the previous and current url in Livewire.

82270.3k4](/packages/ralphjsmit-livewire-urls)[worksome/exchange

Check Exchange Rates for any currency in Laravel.

123544.7k](/packages/worksome-exchange)[hydrat/filament-table-layout-toggle

Filament plugin adding a toggle button to tables, allowing user to switch between Grid and Table layouts.

6292.3k1](/packages/hydrat-filament-table-layout-toggle)[codebar-ag/laravel-filament-json-field

A Laravel Filament JSON Field integration with CodeMirror support

1124.1k](/packages/codebar-ag-laravel-filament-json-field)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
