PHPackages                             codelinde/laravel-navsmith - 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. codelinde/laravel-navsmith

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

codelinde/laravel-navsmith
==========================

Create navigation links from Laravel routes with ease.

0.1.0(1y ago)114[4 PRs](https://github.com/codelinde/laravel-navsmith/pulls)MITPHPPHP ^8.2CI passing

Since Aug 12Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/codelinde/laravel-navsmith)[ Packagist](https://packagist.org/packages/codelinde/laravel-navsmith)[ Docs](https://github.com/codelinde/laravel-navsmith)[ GitHub Sponsors](https://github.com/CodeLinde)[ RSS](/packages/codelinde-laravel-navsmith/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (13)Versions (7)Used By (0)

Navsmith
========

[](#navsmith)

[![Latest Version on Packagist](https://camo.githubusercontent.com/2e4f630e4ab6c921e90c56890d73e5497586a2a36dd245fef39730f562e78a91/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f636f64656c696e64652f6c61726176656c2d6e6176736d6974682e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/codelinde/laravel-navsmith)[![GitHub Tests Action Status](https://camo.githubusercontent.com/67ec98e5597dcef81aded244161560d0540e655fa5db44018b5a383e138e9e3b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f636f64656c696e64652f6c61726176656c2d6e6176736d6974682f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/codelinde/laravel-navsmith/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/26f50b866b2316d878bbecda86af94b3b6b966329e246baed4d9f9444431277f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f636f64656c696e64652f6c61726176656c2d6e6176736d6974682f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/codelinde/laravel-navsmith/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/ab736a393cf69bf033d239d5f5cfc8ad95d1b2effff6e12e56c7b19a0e735c48/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f636f64656c696e64652f6c61726176656c2d6e6176736d6974682e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/codelinde/navsmith)

**Navsmith** is a lightweight, unintrusive Laravel package for easily creating navigation links out of routes you define. It's particularly useful for SPA-like sites.

Usage
-----

[](#usage)

Just define your routes using the `navsmith` method and give them route names you'd like to use in your display...

```
Route::navsmith(function () {
    Route::get('/', Welcome::class)->name('home');
    Route::get('/about', About::class)->name('about');
    Route::get('/contact', Contact::class)->name('contact');
});
```

Include the `x-navsmith` Blade component...

```

```

And you get display-ready HTML links.

```

    Home

    About

    Contact

```

Using the `current` attribute on the component, you can give the links different styling according to whether they are the currently-visited page (either CSS styles or class-based styles) and get a SPA-like experience:

**Class-based styles (e.g. [TailwindCSS](https://tailwindcss.com/))**

```

Home
```

**CSS styles**

```

Home
```

You can also pass through any attributes to your links. This is particularly useful if you're using [Livewire](https://livewire.laravel.com) and want to take advantage of its SPA-like navigation features by using `wire:navigate`.

```

Home
```

Furthermore, a `navsmith_route` helper function is provided so that you can refer to your Navsmith routes elsewhere in your code without having to remember the specific naming prefix applied.

Given a route definition like this

```
Route::navsmith(function () {
    Route::get('/a-cumbersome-url', Contact::class)->name('contact');
});
```

And a call to `navsmith_route` like this

```
Please visit the contact page to send us an e-mail.
```

The HTML will render like this

```
Please visit the contact page to send us an e-mail.
```

Requirements
------------

[](#requirements)

Navsmith requires Laravel 10 or 11 and PHP 8.2+.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require codelinde/navsmith
```

Customization
-------------

[](#customization)

You can publish the views to make any desired alterations by running the following command.

```
php artisan vendor:publish --tag="navsmith-views"
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

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

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

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

Credits
-------

[](#credits)

- [Ryan Linde](https://github.com/codelinde)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance60

Regular maintenance activity

Popularity7

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 50% 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

Unknown

Total

1

Last Release

689d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/15930857?v=4)[Ryan Linde](/maintainers/codelinde)[@codelinde](https://github.com/codelinde)

---

Top Contributors

[![codelinde](https://avatars.githubusercontent.com/u/15930857?v=4)](https://github.com/codelinde "codelinde (10 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (5 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (5 commits)")

---

Tags

laravelcodelindenavsmithlaravel-navsmith

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/codelinde-laravel-navsmith/health.svg)

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

###  Alternatives

[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.8M46](/packages/spatie-laravel-pdf)[codewithdennis/filament-select-tree

The multi-level select field enables you to make single selections from a predefined list of options that are organized into multiple levels or depths.

329530.5k29](/packages/codewithdennis-filament-select-tree)[worksome/exchange

Check Exchange Rates for any currency in Laravel.

124603.0k](/packages/worksome-exchange)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.6k](/packages/rawilk-profile-filament-plugin)[stephenjude/laravel-wallet

A simple wallet implementation for Laravel

26611.9k](/packages/stephenjude-laravel-wallet)[tarfin-labs/event-machine

Event-driven state machines for Laravel with event sourcing, type-safe context, and full audit trail.

199.4k](/packages/tarfin-labs-event-machine)

PHPackages © 2026

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