Download the PHP package jarir-ahmed/kill-switch without Composer
On this page you can find all versions of the php package jarir-ahmed/kill-switch. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download jarir-ahmed/kill-switch
More information about jarir-ahmed/kill-switch
Files in jarir-ahmed/kill-switch
Download jarir-ahmed/kill-switch
More information about jarir-ahmed/kill-switch
Files in jarir-ahmed/kill-switch
Vendor jarir-ahmed
Package kill-switch
Short Description A framework-agnostic PHP kill-switch package using PSR-15 middleware. Returns a maintenance page when enabled.
License MIT
Homepage https://github.com/jarir2020/jarir-ahmed-killswitch
Package kill-switch
Short Description A framework-agnostic PHP kill-switch package using PSR-15 middleware. Returns a maintenance page when enabled.
License MIT
Homepage https://github.com/jarir2020/jarir-ahmed-killswitch
Please rate this library. Is it a good library?
Informations about the package kill-switch
jarir-ahmed-killswitch
Kill Switch
A framework-agnostic PHP kill-switch package using PSR-15 middleware. When enabled, every request returns a 503 maintenance page with the message "We are In Maintenance Mode".
Installation
Requirements
- PHP >= 8.0
psr/http-messagepsr/http-server-middlewarepsr/http-factory
Usage
Configuration
The kill switch state is checked in this priority order:
- Environment variable —
KILL_SWITCH_ENABLED(true/false) - File — configurable path, contents must match
file_enabled_value(default:1) - Database — DSN + table + column, toggled externally
PSR-15 Middleware (Any Framework)
Toggle Methods
Env Variable
Or in .env:
File
Database
Laravel Integration
Step 1: Publish Config (Optional)
Step 2: Register Middleware
In app/Http/Kernel.php:
Step 3: Configure
Edit config/kill-switch.php:
Custom Maintenance Page
Place your custom HTML at the configured view_path. The default template is at:
Testing
License
MIT
All versions of kill-switch with dependencies
PHP Build Version
Package Version
Requires
php Version
^8.0
psr/http-message Version ^1.0 || ^2.0
psr/http-server-middleware Version ^1.0
psr/http-factory Version ^1.0
nyholm/psr7 Version ^1.7
psr/http-message Version ^1.0 || ^2.0
psr/http-server-middleware Version ^1.0
psr/http-factory Version ^1.0
nyholm/psr7 Version ^1.7
The package jarir-ahmed/kill-switch contains the following files
Loading the files please wait ...