Forked from https://github.com/ekaragodin/MaintenanceMode
Install the composer-asset-plugin, before you update your project:
php composer.phar global require "fxp/composer-asset-plugin"
Add to composer.json & update composer:
"require": {
"beaten-sect0r/yii-maintenancemode": "dev-master"
}
"extra": {
"asset-installer-paths": {
"npm-asset-library": "vendor/npm",
"bower-asset-library": "vendor/bower"
}
}
Add to config/main.php:
// aliases
Yii::setPathOfAlias('vendor', dirname(__FILE__).'/../vendor');
'preload' => array('log', 'maintenanceMode'),
'components' => array(
'maintenanceMode' => array(
'class' => 'vendor.beaten-sect0r.yii-maintenancemode.MaintenanceMode',
'enabledMode' => true,
// year-month-day hour:minute:second
'date' => '0000-00-00 00:00:00', // время окончания работ
'message' => 'Извините, на сайте ведутся технические работы.',
// or
//'capUrl' => '',
// allowed users
//'users' => array('admin',),
// allowed roles
//'roles' => array('Administrator',),
// allowed IP
//'ips' => array('127.0.0.1',),
// allowed urls
//'urls' => array('',),
),
),
No stable releases.
Comments