andriymiz / laravel-staging-mode
Staging mode for Laravel project
v1.1.0
2024-07-21 22:45 UTC
Requires
- php: >=7.4.0
- illuminate/console: ^5.6||^5.7||^5.8||^6.0||^7.0||^8.0||^9.0||^10.0||^11.0
- illuminate/http: ^5.6||^5.7||^5.8||^6.0||^7.0||^8.0||^9.0||^10.0||^11.0
- illuminate/support: ^5.6||^5.7||^5.8||^6.0||^7.0||^8.0||^9.0||^10.0||^11.0
Requires (Dev)
- laravel/pint: ^1.14
- nunomaduro/collision: ^8.1.1||^7.10.0
README
This package allows you to enable a "staging mode" for your Laravel application. This mode is similar to maintenance mode, but without blocking scheduled tasks and queues.
Installation
You can install the package via composer:
composer require andriymiz/laravel-staging-mode
You can publish the config file with:
php artisan vendor:publish --tag="staging-mode-config"
Add middleware in app/Http/Kernel.php
:
protected $middleware = [ // ... \StagingMode\Http\Middleware\PreventRequestsDuringStaging::class, ];
Usage
Run the following command to enable the staging mode:
php artisan staging:enable
This command will add the STAGING_MODE_SECRET
environment variable to your .env
file:
STAGING_MODE_SECRET=your-secret
Go to the /your-secret
URL for allowing requests to your application.
License
The MIT License (MIT). Please see License File for more information.