red-ray/index-prevention

This package allows preventing indexing of a website during development

1.0 2021-03-05 12:16 UTC

This package is not auto-updated.

Last update: 2024-04-28 03:51:45 UTC


README

Publish assets

php artisan vendor:publish --provider="RedRay\IndexPrevention\RedRayIndexPreventionProvider"

Set .env variable

...
SHOULD_PREVENT_INDEX=true
...

Add the middleware to app/Http/Kernel.php

protected $middlewareGroups = [
        'web' => [
            ...
            \RedRay\IndexPrevention\Middleware\PreventContentIndex::class
            ...
        ],
    ];