red-ray/index-prevention

This package allows preventing indexing of a website during development

Installs: 14

Dependents: 0

Suggesters: 0

Security: 0

pkg:composer/red-ray/index-prevention

1.0 2021-03-05 12:16 UTC

This package is not auto-updated.

Last update: 2025-09-28 11:14:21 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
            ...
        ],
    ];