PHPackages                             drunkcode/rickroll - 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. drunkcode/rickroll

ActiveLibrary

drunkcode/rickroll
==================

0.2.0(5y ago)23MITPHPPHP ^7.1

Since Nov 18Pushed 5y ago1 watchersCompare

[ Source](https://github.com/drunkcode-uk/rickroll)[ Packagist](https://packagist.org/packages/drunkcode/rickroll)[ Docs](https://github.com/drunkcode/rickroll)[ RSS](/packages/drunkcode-rickroll/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (2)Versions (3)Used By (0)

Rick Roll
=========

[](#rick-roll)

[![Latest Version on Packagist](https://camo.githubusercontent.com/60d0643abef429d8e772f50129f2c91e5cf5ee746e2f2bdf76f8bc3f4d5d3c01/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6472756e6b636f64652f7269636b726f6c6c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/drunkcode/rickroll)[![Build Status](https://camo.githubusercontent.com/db6099e8720f4fe91b335075df3483a6c9831af838cd54d45444e3d06410fcbc/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6472756e6b636f64652f7269636b726f6c6c2f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/drunkcode/rickroll)[![Quality Score](https://camo.githubusercontent.com/95ee34b2cba63ad3312582477dda192287098a15fe3ec90ae2341482c185e90a/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6472756e6b636f64652f7269636b726f6c6c2e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/drunkcode/rickroll)[![Total Downloads](https://camo.githubusercontent.com/8a8050b7077fd508c8f219dd75fd99138cdc3115ba034d9309d4eb8934e7959a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6472756e6b636f64652f7269636b726f6c6c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/drunkcode/rickroll)

Rick Roll users of your application by applying a Middleware that will randomly determine their fate!

Applying the RickRollMiddleware to your Web Middleware Group will randomly generate a number on each web request, if the outcome is zero, they will be returned a view with an embed youtube video of Rick Astley's Never Gonna Give You Up instead of their expected request.

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

[](#installation)

You can install the package via composer:

```
composer require drunkcode/rickroll
```

Usage
-----

[](#usage)

Add the `Drunkcode\RickRoll\Http\Middleware\RickRollMiddleware::class` middleware to your web middleware group in `app\Http\Kernel.php` file

```
// app\Http\Kernel.php
protected $middlewareGroups = [
    'web' => [
        ...
        \Drunkcode\RickRoll\Http\Middleware\RickRollMiddleware::class,
    ],
    ...
];
```

### Testing

[](#testing)

```
composer test
```

### Changelog

[](#changelog)

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

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

[](#contributing)

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

### Security

[](#security)

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

Credits
-------

[](#credits)

- [Ray Blair](https://github.com/rayblair06)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

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 ~1 days

Total

2

Last Release

2005d ago

### Community

Maintainers

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

---

Tags

laravelmiddlewarephprickastleyrickrollrickrolldrunkcode

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/drunkcode-rickroll/health.svg)

```
[![Health](https://phpackages.com/badges/drunkcode-rickroll/health.svg)](https://phpackages.com/packages/drunkcode-rickroll)
```

PHPackages © 2026

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