PHPackages                             neurony/laravel-redirects - 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. neurony/laravel-redirects

Abandoned → [varbox/varbox](/?search=varbox%2Fvarbox)Library[HTTP &amp; Networking](/categories/http)

neurony/laravel-redirects
=========================

Nested URLs redirect logic for Laravel

3.0.0(5y ago)1132.4k9[1 issues](https://github.com/Neurony/laravel-redirects/issues)MITPHPPHP ^7.2.5CI failing

Since Jun 3Pushed 5y ago8 watchersCompare

[ Source](https://github.com/Neurony/laravel-redirects)[ Packagist](https://packagist.org/packages/neurony/laravel-redirects)[ RSS](/packages/neurony-laravel-redirects/feed)WikiDiscussions master Synced yesterday

READMEChangelog (3)Dependencies (5)Versions (4)Used By (0)

Package discontinued! Check out VARBOX.IO instead.
==================================================

[](#package-discontinued-check-out-varboxio-instead)

Unfortunately this package is now discontinued.
Please check out [Varbox](https://varbox.io) (Laravel Admin Panel) for this functionality and much more.

- Buy:
- Docs:
- Demo:
- Repo

Thank you!

---

### Nested redirects for Laravel

[](#nested-redirects-for-laravel)

[![Build Status](https://camo.githubusercontent.com/190cacd18df777e52dc0602429955899b330a8c4696cb99d4f1dfb9b8ca3e193/68747470733a2f2f7472617669732d63692e6f72672f4e6575726f6e792f6c61726176656c2d7265646972656374732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Neurony/laravel-redirects)[![StyleCI](https://camo.githubusercontent.com/c1cd20e146bc28fda8721c953569a072a6391b9325eb55617e8188a637066d94/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3138393833373931392f736869656c643f6272616e63683d6d6173746572)](https://github.styleci.io/repos/189837919)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/476206b637abe037fb71ceed0de9d733fe1e087f2d6307c2f19564af7e9f59d7/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4e6575726f6e792f6c61726176656c2d7265646972656374732f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/Neurony/laravel-redirects/?branch=master)

- [Overview](#overview)
- [Installation](#installation)
- [Usage](#usage)

### Overview

[](#overview)

This package allows you to create simple or multiple nested redirects for your Laravel applications.

This package can be useful from an SEO perspective, when in your application, you have URLs that have the potential of being modified.

**Example of the dynamic redirecting logic:**

- Let's assume you have an URL called `/original`
- You create a redirect from `/original` to `/modified`

    > Accessing `/original` will redirect to `/modified`
- You create another redirect from `/modified` to `/modified-again`

    > Accessing `/modified` will redirect to `/modified-again` AND
    > Accessoing `/original` will redirect to `/modified-again`
- You create another redirect from `/modified-again` to `/modified-yet-again`

    > Accessing `/modified-again` will redirect to `/modified-yet-again` AND
    > Accessing `/modified` will redirect to `/modified-yet-again` AND
    > Accessing `/original` will redirect to `/modified-yet-again`
- You create another redirect from `modified-yet-again` to `/original`

    > Accessing `/modified-yet-again` will redirect to `/original` AND
    > Accessing `/modified-again` will redirect to `/original` AND
    > Accessing `/modified` will redirect to `/original`

### Installation

[](#installation)

Install the package via Composer:

```
composer require neurony/laravel-redirects

```

Publish the config file with:

```
php artisan vendor:publish --provider="Neurony\Redirects\ServiceProvider" --tag="config"

```

Publish the migration file with:

```
php artisan vendor:publish --provider="Neurony\Redirects\ServiceProvider" --tag="migrations"

```

After the migration has been published you can create the `redirects` table by running:

```
php artisan migrate

```

### Usage

[](#usage)

##### Add the middleware

[](#add-the-middleware)

In order for the redirecting functionality to actually happen, you need to add the `Neurony\Redirects\Middleware\RedirectRequests` middleware.

Go to `App\Http\Kernel` and add the `Neurony\Redirects\Middleware\RedirectRequests` middleware in your `$middlewareGroups` groups of choice.

```
/**
 * The application's route middleware groups.
 *
 * @var array
 */
protected $middlewareGroups = [
    'web' => [
        ...
        \Neurony\Redirects\Middleware\RedirectRequests::class,
```

##### Creating redirects

[](#creating-redirects)

You should never use the `Neurony\Redirects\Models\Redirect` directly, as this is the default concrete implementation for the `Neurony\Redirects\Contracts\RedirectModelContract`.

Using the `Neurony\Redirects\Models\Redirect` model class directly will prevent you from being able to extend the model's capabilities.

You can create redirects that will be stored inside the `redirects` table like this:

```
app('redirect.model')->create([
    'old_url' => '/your-old-url',
    'new_url' => '/your-new-url',
    'status' => 301
]);
```

To see how you can extend the `Neurony\Redirects\Models\Redirect` model's capabilities, please read the comments from `/config/redirects.php -> redirect_model`

### Credits

[](#credits)

- [Andrei Badea](https://github.com/zbiller)
- [All Contributors](../../contributors)

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

### License

[](#license)

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

### Changelog

[](#changelog)

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

### Contributing

[](#contributing)

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

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity32

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 90.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 ~185 days

Total

3

Last Release

2164d ago

Major Versions

1.0.0 → 2.0.02019-11-19

2.0.0 → 3.0.02020-06-09

PHP version history (3 changes)1.0.0PHP ^7.1.3

2.0.0PHP ^7.2

3.0.0PHP ^7.2.5

### Community

Maintainers

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

---

Top Contributors

[![zbiller](https://avatars.githubusercontent.com/u/2579306?v=4)](https://github.com/zbiller "zbiller (38 commits)")[![lloricode](https://avatars.githubusercontent.com/u/8251344?v=4)](https://github.com/lloricode "lloricode (2 commits)")[![bacanu](https://avatars.githubusercontent.com/u/1362133?v=4)](https://github.com/bacanu "bacanu (1 commits)")[![pideee](https://avatars.githubusercontent.com/u/23198327?v=4)](https://github.com/pideee "pideee (1 commits)")

---

Tags

urlsluglaravelredirectseo

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/neurony-laravel-redirects/health.svg)

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

###  Alternatives

[sirodiaz/laravel-redirection

Laravel package that allows storing in database (or other sources) urls to redirect for SEO purposes

6316.0k](/packages/sirodiaz-laravel-redirection)[api-platform/laravel

API Platform support for Laravel

59126.4k6](/packages/api-platform-laravel)[marcelgwerder/laravel-api-handler

Package providing helper functions for a Laravel REST-API

16092.6k](/packages/marcelgwerder-laravel-api-handler)[fsasvari/laravel-trailing-slash

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

63164.3k](/packages/fsasvari-laravel-trailing-slash)[dragon-code/laravel-http-logger

Logging incoming HTTP requests

319.8k3](/packages/dragon-code-laravel-http-logger)[jaybizzle/safeurl

A Laravel package to create safe, SEO friendly urls

1786.1k1](/packages/jaybizzle-safeurl)

PHPackages © 2026

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