light / yii2-offline
offline action
Installs: 10
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/light/yii2-offline
Requires
- yiisoft/yii2: *
This package is auto-updated.
Last update: 2025-09-08 21:07:14 UTC
README
offline action
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'] ...