light/yii2-offline

offline action

1.0.0 2015-12-29 03:49 UTC

This package is auto-updated.

Last update: 2024-09-08 19:01:31 UTC


README

offline action

Build Status version Download Contact

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist light/yii2-offline "*"

or add

"light/yii2-offline": "*"

to the require section of your composer.json file.

Usage

Once the extension is installed, simply use it in your code by :

public function actions()
{
    return [
        'offline' => [
            'class' => 'light\Offline\OfflineAction',
            'title' => '维护中',
            'description' => '服务器正在维护中, <br /> 请稍后访问',
        ]
    ];
}

Your config file:

...
'catchAll' => ['site/offline']
...

License

MIT