ekaragodin / yii-maintenance-mode
Maintenance mode for Yii framework.
Installs: 1 457
Dependents: 0
Suggesters: 0
Security: 0
Stars: 33
Watchers: 7
Forks: 9
Open Issues: 0
This package is auto-updated.
Last update: 2020-02-09 04:01:49 UTC
README
#Maintenance mode for Yii framework.
##Install Copy extension to your folder path/to/extensions.
Or add
"ekaragodin/yii-maintenance-mode": "dev-master"
to the require section of your composer.json
file.
Add to config/main.php:
'preload' => array('log', 'maintenanceMode'),
...
'components' => array(
'maintenanceMode' => array(
'class' => 'application.extensions.MaintenanceMode.MaintenanceMode',
),
...
),
##Options
'maintenanceMode' => array(
'class' => 'application.extensions.MaintenanceMode.MaintenanceMode',
'enabledMode' => true,
'message' => 'Hello!',
// or
//'capUrl' => 'site/contact',
// allowed users
'users' => array('admin', ),
// allowed roles
'roles' => array('Administrator', ),
// allowed IP
'ips' => array('123.456.789.000', ),
// allowed urls
'urls' => array('/site/login', '/login', ),
),