PHPackages                             appstract/laravel-referer-redirector - 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. appstract/laravel-referer-redirector

AbandonedArchivedLibrary

appstract/laravel-referer-redirector
====================================

Manage redirects based on referers

1.0.0(8y ago)32321MITPHPPHP &gt;=5.6

Since Jun 1Pushed 8y ago4 watchersCompare

[ Source](https://github.com/appstract/laravel-referer-redirector)[ Packagist](https://packagist.org/packages/appstract/laravel-referer-redirector)[ Docs](https://github.com/appstract/laravel-referer-redirect)[ RSS](/packages/appstract-laravel-referer-redirector/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)Dependencies (1)Versions (6)Used By (0)

Laravel Referer Redirector
==========================

[](#laravel-referer-redirector)

[![Latest Version on Packagist](https://camo.githubusercontent.com/c40164a76fa4fc16e5c75cfaf0ccc72bc880ed3baef2232d066d72eee9297530/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6170707374726163742f6c61726176656c2d726566657265722d72656469726563746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/appstract/laravel-referer-redirector)[![Total Downloads](https://camo.githubusercontent.com/07c217a779c4d7eb24e1d6b318ee240172d67e4e401776b89ce4429f45cc7be7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6170707374726163742f6c61726176656c2d726566657265722d72656469726563746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/appstract/laravel-referer-redirector)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/4aa1b64f666b5c1fe21a584a16318ee7e6a3afee322e8defdb2c9ff322843a82/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6170707374726163742f6c61726176656c2d726566657265722d72656469726563746f722f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/appstract/laravel-referer-redirector)

Manage redirects based on referers. You can add start and end dates so a referer can redirect to different url's in different time periods.

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

[](#installation)

You can install the package via composer:

```
composer require appstract/laravel-referer-redirector
```

### Publish

[](#publish)

By running php artisan vendor:publish --provider="Appstract\\RefererRedirector\\RefererRedirectorServiceProvider" in your project all files for this package will be published. The file that will be published is a migration. A middleware will be registered.

Run the migration:

```
php artisan migrate
```

Usage
-----

[](#usage)

You need to add a middleware to handle the requests.

Add it to single routes:

```
Route::get('welcome', function () {
    //
})->middleware('redirect-referer');
```

Add it to route groups:

```
Route::group(['middleware' => ['redirect-referer']], function () {
    //
});
```

Or add it as global middleware:

```
protected $middleware = [
    ...

    \Appstract\RefererRedirector\Middleware\RedirectReferer::class,

    ...
];
```

Console
-------

[](#console)

You can add a new redirect based on referer:

```
php artisan referer:make {referer} {redirect} {--start=} {--end=}
```

This will lead you through the needed steps.

Remove referer-redirect based on referer or ID:

```
php artisan referer:remove {referer}
```

List all referer-redirects:

```
php artisan referer:list
```

Notes
-----

[](#notes)

If you're going to add referer-redirects manually to the database, keep the following in mind:

- referer\_url: add without http://, https://, ending /
- redirect\_url: the package will make a redirect(redirect\_url), so make sure this url exists
- start\_date: datetime (Carbon)
- end\_date: datetime (Carbon)

Testing
-------

[](#testing)

```
$ composer test
```

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

[](#contributing)

Contributions are welcome, [thanks to y'all](https://github.com/appstract/laravel-referer-redirector/graphs/contributors) :)

About Appstract
---------------

[](#about-appstract)

Appstract is a small team from The Netherlands. We create (open source) tools for webdevelopment and write about related subjects on [Medium](https://medium.com/appstract). You can [follow us on Twitter](https://twitter.com/teamappstract), [buy us a beer](https://www.paypal.me/teamappstract/10) or [support us on Patreon](https://www.patreon.com/appstract).

License
-------

[](#license)

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

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity62

Established project with proven stability

 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

Every ~59 days

Total

5

Last Release

3031d ago

Major Versions

0.1.3 → 1.0.02018-01-22

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1470623?v=4)[Gijs Jorissen](/maintainers/gizburdt)[@gizburdt](https://github.com/gizburdt)

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

---

Top Contributors

[![gizburdt](https://avatars.githubusercontent.com/u/1470623?v=4)](https://github.com/gizburdt "gizburdt (3 commits)")[![303K](https://avatars.githubusercontent.com/u/3934941?v=4)](https://github.com/303K "303K (1 commits)")[![ovanschie](https://avatars.githubusercontent.com/u/3015449?v=4)](https://github.com/ovanschie "ovanschie (1 commits)")[![teuunn](https://avatars.githubusercontent.com/u/17406280?v=4)](https://github.com/teuunn "teuunn (1 commits)")

---

Tags

laravellaravel-packagemiddlewarephpredirectsrefererappstractrefererredirectorreferer-redirector

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/appstract-laravel-referer-redirector/health.svg)

```
[![Health](https://phpackages.com/badges/appstract-laravel-referer-redirector/health.svg)](https://phpackages.com/packages/appstract-laravel-referer-redirector)
```

###  Alternatives

[appstract/laravel-opcache

PHP OPcache Artisan commands for Laravel.

1.4k4.9M7](/packages/appstract-laravel-opcache)[appstract/laravel-blade-directives

Handy Blade directives

8501.2M9](/packages/appstract-laravel-blade-directives)[appstract/laravel-options

Global options loaded from the database

730443.2k4](/packages/appstract-laravel-options)[appstract/laravel-stock

Keep stock for Eloquent models

29038.3k](/packages/appstract-laravel-stock)[appstract/laravel-meta

Model meta

13074.5k](/packages/appstract-laravel-meta)[appstract/laravel-multisite

Multisite setup for Laravel

21411.2k](/packages/appstract-laravel-multisite)

PHPackages © 2026

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