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

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

aw-studio/laravel-redirects
===========================

An easy solution to handle redirects in your Laravel application

v0.8(1y ago)04.8k[1 issues](https://github.com/aw-studio/laravel-redirects/issues)1MITPHPPHP ^7.4|^8.0|^8.1|^8.2|^8.3

Since Jun 4Pushed 1y ago1 watchersCompare

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

READMEChangelog (8)Dependencies (4)Versions (11)Used By (1)

Laravel redirects
=================

[](#laravel-redirects)

This package provides an easy way to create and manage redirects in your Laravel application.

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

[](#installation)

Install the package via Composer:

```
composer require aw-studio/laravel-redirects
```

Publish the packages migrations and config:

```
php artisan vendor:publish --provider="AwStudio\Redirects\RedirectsServiceProvider"
```

Run the migration

```
php artisan migrate
```

Add `AwStudio\Redirects\Middleware\RedirectRoutesMiddleware` to `/app/Http/Kernel.php`:

```
class Kernel extends HttpKernel
{
    protected $middleware = [
        ...
        \AwStudio\Redirects\Middleware\RedirectRoutesMiddleware::class,
    ],
}
```

Usage
-----

[](#usage)

### Using database redirects

[](#using-database-redirects)

The provided `Redirect` model stores the following attributes:

- from\_url
- to\_url
- http\_status\_code (default 301)
- active (default true)

With this you may create redirects like this:

```
app('redirect.model')->create([
    'from_url' => '/old',
    'to_url' => '/new',
    'http_status_code' => 301
]);
```

### Using config redirects

[](#using-config-redirects)

If you need to configure some (static) redirects you may do so in the `config/redirects.php`.

```
'redirects' => [
    '/{any}' => '/en/{any}',
],
```

By default every redirect from the configuration file is handled as a `301`. You may however overwrite it like this:

```
'redirects' => [
    '/old' => ['/temporary-new', 302],
],
```

### Using URL parameters

[](#using-url-parameters)

Both, config and database redirects, support Laravel route parameters:

```
'redirects' => [
    '/blog/{post}' => '/news/{post}',
]

//

app('redirect.model')->create([
    'from_url' => 'blog/{post}',
    'to_url' => 'news/{post}',
]);
```

Credits
-------

[](#credits)

This package is inspired by and based on the discontinued [Neurony/laravel-redirects](https://github.com/Neurony/laravel-redirects) package and also takes inspiration from [spatie/laravel-missing-page-redirector](https://github.com/spatie/laravel-missing-page-redirector).

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance47

Moderate activity, may be stable

Popularity20

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 86.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 ~198 days

Total

8

Last Release

394d ago

PHP version history (4 changes)v0.1PHP ^7.4 | ^8.0

v0.4PHP ^7.4|^8.0|^8.1

v0.7PHP ^7.4|^8.0|^8.1|^8.2

v0.8PHP ^7.4|^8.0|^8.1|^8.2|^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/7b2d65d58480dd7fdbf4f4593158cbd0634550ee9210c49957cc48c8a8ccaef6?d=identicon)[jannescb](/maintainers/jannescb)

---

Top Contributors

[![lpheller](https://avatars.githubusercontent.com/u/36259611?v=4)](https://github.com/lpheller "lpheller (32 commits)")[![jannescb](https://avatars.githubusercontent.com/u/17292622?v=4)](https://github.com/jannescb "jannescb (3 commits)")[![aw-gerrit](https://avatars.githubusercontent.com/u/67461498?v=4)](https://github.com/aw-gerrit "aw-gerrit (1 commits)")[![Chrissle28](https://avatars.githubusercontent.com/u/69738385?v=4)](https://github.com/Chrissle28 "Chrissle28 (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[fumeapp/modeltyper

Generate TypeScript interfaces from Laravel Models

196277.9k](/packages/fumeapp-modeltyper)[api-platform/laravel

API Platform support for Laravel

59126.4k6](/packages/api-platform-laravel)[dragon-code/laravel-http-logger

Logging incoming HTTP requests

319.8k3](/packages/dragon-code-laravel-http-logger)[laravel-shift/curl-converter

A command line tool to convert curl requests to Laravel HTTP requests.

935.3k](/packages/laravel-shift-curl-converter)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[onlime/laravel-http-client-global-logger

A global logger for the Laravel HTTP Client

1935.1k](/packages/onlime-laravel-http-client-global-logger)

PHPackages © 2026

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