drunkcode/rickroll

0.2.0 2020-11-20 15:02 UTC

This package is auto-updated.

Last update: 2024-04-20 22:14:23 UTC


README

Latest Version on Packagist Build Status Quality Score Total Downloads

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

You can install the package via composer:

composer require drunkcode/rickroll

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

composer test

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

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

Credits

License

The MIT License (MIT). Please see License File for more information.