jezzdk/laravel-sweet-regan

Shows a lovely message from everyones favorite demon every once in a while.

v1.1 2022-01-05 07:33 UTC

This package is auto-updated.

Last update: 2024-04-05 12:29:44 UTC


README

Installation

To summon Sweet Regan, add the following middleware to your web group:

protected $middlewareGroups = [
    'web' => [
        \Jezzdk\LaravelSweetRegan\Http\Middleware\SweetRegan::class,
    ],
];

You may publish the config file and view with:

php artisan vendor:publish --provider="Jezzdk\LaravelSweetRegan\SweetReganServiceProvider"

Configuration

The default config looks like this:

return [
    // How often do you want Regan to visit your site?
    'chance' => '1:10',

    // How long do you want Regan to stay on your site? (in seconds)
    'visit_length' => 2,
];