PHPackages                             panchodp/frog-uri - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. panchodp/frog-uri

ActiveLibrary[HTTP &amp; Networking](/categories/http)

panchodp/frog-uri
=================

Inspect,check and review the middlewares applies to your uri's in Laravel.

v0.2.4(1mo ago)020MITPHPPHP ^8.3.0 | ^8.4.0CI passing

Since Sep 14Pushed 1mo agoCompare

[ Source](https://github.com/PanchoDP/frog-uri)[ Packagist](https://packagist.org/packages/panchodp/frog-uri)[ RSS](/packages/panchodp-frog-uri/feed)WikiDiscussions master Synced 3w ago

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

FrogUri
=======

[](#froguri)

[![Php](https://camo.githubusercontent.com/c8d8dad6beb757a2b8acba331d16140813699543b88a37af0a81f20bd35f61de/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e332532422d626c7565)](https://camo.githubusercontent.com/c8d8dad6beb757a2b8acba331d16140813699543b88a37af0a81f20bd35f61de/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e332532422d626c7565)[![Total Downloads](https://camo.githubusercontent.com/a4f63daa72b80589cb610b0c4ce97552c8f15536a5f97b67f18765e6a46d425b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f70616e63686f64702f66726f672d7572692e7376673f)](https://camo.githubusercontent.com/a4f63daa72b80589cb610b0c4ce97552c8f15536a5f97b67f18765e6a46d425b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f70616e63686f64702f66726f672d7572692e7376673f)[![Latest Stable Version](https://camo.githubusercontent.com/122578eed7904f47ffac1a0fca7214c49b3beb2d47c205c0872b37dcff7159a9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f70616e63686f64702f66726f672d7572692e7376673f)](https://packagist.org/packages/panchodp/frog-uri)[![License](https://camo.githubusercontent.com/5caa455d8debc46fb23abbadb45a733a937f3910a73fc875c2f7820468e1bb54/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d677265656e)](https://packagist.org/packages/panchodp/frog-uri)[![Tests](https://github.com/PanchoDP/frog-uri/actions/workflows/tests.yml/badge.svg)](https://github.com/PanchoDP/frog-uri/actions/workflows/tests.yml)

Important

Caution: This package is a work in progress and may not be production-ready. Use at your own risk.

**Inspect, check, review and filter Laravel middlewares applied to your routes.**

FrogUri is a powerful Laravel package that helps you analyze your application's routing structure, identify security vulnerabilities, and understand middleware distribution across your routes.

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

[](#installation)

Install the package via Composer:

```
composer require panchodp/frog-uri --dev
```

The package will automatically register itself via Laravel's package discovery.

Usage
-----

[](#usage)

### Basic Analysis

[](#basic-analysis)

Analyze all your application routes and get detailed information about middlewares:

```
php artisan frog:analyze
```

This command will show you:

- Total number of routes
- Middleware distribution
- Routes summary and statistics

### Security Analysis (Danger Mode)

[](#security-analysis-danger-mode)

Identify potentially vulnerable routes without middleware protection:

```
php artisan frog:analyze --danger
```

This will display:

- �� **Routes without any middleware** (potential security risks)
- Formatted list with HTTP methods, URIs, and controllers
- Security recommendations

### Interactive Route Filtering

[](#interactive-route-filtering)

Filter and analyze routes interactively with the new `frog:filter` command:

```
php artisan frog:filter
```

**Features:**

- 📋 **Interactive middleware selection** with numbered table interface
- 🎯 **Flexible filtering options**: Select individual middlewares (1,3,5) or all middlewares
- 🚫 **Exclude mode** for security audits: `php artisan frog:filter --exclude`
- 📊 **Visual results** with organized route information

#### Include Mode (Default)

[](#include-mode-default)

Shows routes that **HAVE** the selected middlewares:

```
php artisan frog:filter
# Select middleware numbers to see routes WITH those middlewares
```

#### Exclude Mode (Security Audits)

[](#exclude-mode-security-audits)

Shows routes that **DO NOT HAVE** the selected middlewares:

```
php artisan frog:filter --exclude
# Select middleware numbers to find routes WITHOUT those middlewares
```

**Common Security Use Cases:**

```
# Find routes without authentication
php artisan frog:filter --exclude
# Select "auth" to find unprotected routes

# Find routes without rate limiting
php artisan frog:filter --exclude
# Select "throttle" to find routes without rate limiting

# Find routes without both auth and admin protection
php artisan frog:filter --exclude
# Select "auth,admin" to find vulnerable admin routes
```

Features
--------

[](#features)

### RouteCollection API

[](#routecollection-api)

The package provides a powerful `RouteCollection` class for programmatic route analysis:

```
use FrogUri\Actions\GetJsonAction;
use FrogUri\Actions\MappingAction;

// Get route data
$jsonData = GetJsonAction::handle();
$collection = MappingAction::handle($jsonData);

// Filter by middleware
$authRoutes = $collection->filterByMiddleware('auth');
$multipleMiddlewares = $collection->filterByMiddleware(['auth', 'verified']);

// Filter by HTTP method
$getRoutes = $collection->filterByMethod('GET');
$postRoutes = $collection->filterByMethod(['POST', 'PUT']);

// Chain filters
$secureApiRoutes = $collection
    ->filterByUri('api/*')
    ->filterByMiddleware('auth')
    ->filterByMethod('GET');

// Security analysis
$vulnerableRoutes = $collection->getRoutesWithoutMiddleware();
$dangerousRoutes = $collection->getDangerousRoutes();

// NEW: Exclude filtering for security audits
$unprotectedRoutes = $collection->excludeByMiddleware('auth');
$noRateLimitRoutes = $collection->excludeByMiddleware(['throttle', 'rate_limit']);
$adminRoutesWithoutAuth = $collection
    ->filterByUri('admin/*')
    ->excludeByMiddleware('auth');
```

### Available Filter Methods

[](#available-filter-methods)

MethodDescriptionExample`filterByMiddleware()`Filter routes by middleware`$collection->filterByMiddleware('auth')``excludeByMiddleware()`**NEW** Exclude routes with middleware`$collection->excludeByMiddleware('auth')``filterByMethod()`Filter routes by HTTP method`$collection->filterByMethod('POST')``filterByUri()`Filter routes by URI pattern`$collection->filterByUri('api/*')``filterByName()`Filter routes by route name`$collection->filterByName('admin.*')``getRoutesWithoutMiddleware()`Get routes without any middleware`$collection->getRoutesWithoutMiddleware()``getRoutesWithoutSpecificMiddleware()`**NEW** Get routes without specific middleware`$collection->getRoutesWithoutSpecificMiddleware('auth')`### Utility Methods

[](#utility-methods)

```
// Get all unique middlewares
$middlewares = $collection->getAllMiddlewares();

// Get all HTTP methods
$methods = $collection->getAllMethods();

// Group routes by middleware
$groupedByMiddleware = $collection->groupByMiddleware();

// Group routes by HTTP method
$groupedByMethod = $collection->groupByMethod();

// Get route count
$totalRoutes = $collection->count();
```

Use Cases
---------

[](#use-cases)

### Security Audits

[](#security-audits)

- **Interactive filtering** with `frog:filter --exclude` to find vulnerable routes
- Identify routes without authentication middleware
- Find API endpoints missing rate limiting
- Locate admin routes without proper protection
- **Bulk security scanning** using exclude mode for multiple middlewares

### Code Reviews

[](#code-reviews)

- Ensure consistent middleware application
- Verify route protection standards
- Document middleware usage patterns

### Development

[](#development)

- Debug routing issues
- Understand middleware inheritance
- Validate route configurations

Credits
-------

[](#credits)

- [Francisco de Pablo](https://github.com/panchodp)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance91

Actively maintained with recent releases

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity48

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

Every ~48 days

Recently: every ~60 days

Total

6

Last Release

45d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/fbd7042f63f458531364245f5985884dea96cc46d2b7844d5dd8c0bcad61f8e8?d=identicon)[Francisco de Pablo](/maintainers/Francisco%20de%20Pablo)

---

Top Contributors

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

---

Tags

uriphpmiddlewarelaraveldevroutescommand

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/panchodp-frog-uri/health.svg)

```
[![Health](https://phpackages.com/badges/panchodp-frog-uri/health.svg)](https://phpackages.com/packages/panchodp-frog-uri)
```

###  Alternatives

[fsasvari/laravel-trailing-slash

The package that adds redirection with trailing slash to Laravel framework.

61169.6k](/packages/fsasvari-laravel-trailing-slash)[basement-chat/basement-chat

Add a real-time chat widget to your Laravel application.

4984.0k](/packages/basement-chat-basement-chat)[tomschlick/request-migrations

HTTP Request Migrations

1844.5k](/packages/tomschlick-request-migrations)[josantonius/url

PHP library to access URL information.

123.3k2](/packages/josantonius-url)

PHPackages © 2026

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