faizalmansor / lumen-6-maintenance-mode by faizalmansor
forked from j3rrey/lumen-5-maintenance-mode

Define application maintenance mode.
4,205
1
0
Package Data
Maintainer Username: faizalmansor
Maintainer Contact: faizalmansor@gmail.com (Faizal Mansor)
Package Create Date: 2020-01-14
Package Last Update: 2020-01-28
Home Page:
Language: PHP
License: MIT
Last Refreshed: 2024-04-18 15:28:26
Package Statistics
Total Downloads: 4,205
Monthly Downloads: 3
Daily Downloads: 0
Total Stars: 1
Total Watchers: 0
Total Forks: 2
Total Open Issues: 0

Lumen 6 simple maintenance mode

Build Status Latest Stable Version Total Downloads License

php 7.3 Lumen 6.2

How to install

composer require faizalmansor/lumen-6-maintenance-mode

How to configure

Add this to your AppServiceProvider or in bootstrap/app.php

$app->register(
    faizalmansor\MaintenanceMode\Providers\MaintenanceModeServiceProvider::class
);

Add the up and down commands in app/console/Kernel.php

    protected $commands = [
        \faizalmansor\MaintenanceMode\Console\Commands\DownCommand::class,
        \faizalmansor\MaintenanceMode\Console\Commands\UpCommand::class
    ];

Maintenance Mode on

php artisan down

Maintenance Mode off

php artisan up

IP based access

Currently only ipv4 and no ipranges

Add ALLOWED_IPS in your .env file

ALLOWED_IPS=192.168.1.2,127.0.0.1,136.22.16.0

Features planned:

  • IP Ranges
  • Dynamic DNS IP Filtering