PHPackages                             dartmoon/laravel-route-helpers - 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. dartmoon/laravel-route-helpers

ActiveLibrary

dartmoon/laravel-route-helpers
==============================

Set of helper for the Route facade

v1.0.0(3y ago)02.1k↓42.9%1MITPHP

Since May 16Pushed 2y ago1 watchersCompare

[ Source](https://github.com/dartmoon-io/laravel-route-helpers)[ Packagist](https://packagist.org/packages/dartmoon/laravel-route-helpers)[ RSS](/packages/dartmoon-laravel-route-helpers/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (4)Versions (2)Used By (1)

Laravel Route Helpers
=====================

[](#laravel-route-helpers)

Add a simple Route::when macro to conditionally register routes.

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

[](#installation)

```
composer require dartmoon/laravel-route-helpers
```

Usage
-----

[](#usage)

When the condition is true the route will be registered, otherwise it will be ignored.

```
Route::when($condition, function () {
    Route::get('/registered/only/when/condition/is/true', fn () => 'Hello World');
});
```

For example you can register routes base on app locale.

```
Route::when(app()->getLocale() == 'en', function () {
    Route::get('about', fn () => 'English');
});

Route::when(app()->getLocale() == 'it', function () {
    Route::get('about', fn () => 'Italiano');
});
```

License
-------

[](#license)

This project is licensed under the MIT License - see the LICENSE.md file for details

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

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

1098d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2efeef5805499c8446aee9d5cbb924e27978d6efceff1cb0d4865ffd2e937d86?d=identicon)[alessandro1105](/maintainers/alessandro1105)

---

Top Contributors

[![alessandro1105](https://avatars.githubusercontent.com/u/4523050?v=4)](https://github.com/alessandro1105 "alessandro1105 (4 commits)")

---

Tags

laravellaravel-package

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/dartmoon-laravel-route-helpers/health.svg)

```
[![Health](https://phpackages.com/badges/dartmoon-laravel-route-helpers/health.svg)](https://phpackages.com/packages/dartmoon-laravel-route-helpers)
```

PHPackages © 2026

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