ميرفك/yii2-under-construction

Yii2 Under Construction Module

安装数量: 1,804

依赖项: 0

建议者: 0

安全: 0

星标: 1

关注者: 2

分支: 0

公开问题: 0

类型:yii2-extension

v1.0.1 2015-07-18 20:56 UTC

This package is not auto-updated.

Last update: 2024-09-14 17:06:02 UTC


README

Analytics

这是一个简单的yii2扩展,可以阻止对网站的访问。

安装

通过composer

composer require "mervick/yii2-under-construction" "~1.0"

使用方法

添加到您的 config.php

return [
    // ...
    'modules' => [
        'under-construction' => [
            'class' => '\mervick\underconstruction\Module',
            // this is the on off switch
            'locked' => true, 
            // the list of IPs that are allowed to access site.
            // The default value is `['127.0.0.1', '::1']`, which means the site can only be accessed by localhost.
            'allowedIPs' => ['127.0.0.1', '::1'],
            // change this to your namespace, if you want use your own controller
            'controllerNamespace' => 'mervick\underconstruction\controllers', 
            // if you want use your views
            'viewPath' => '@alias/to/viewPath',
            // default layout
            'layout' => 'main', 
            // if you want redirect to external website, default is null
            'redirectURL' => 'http://example.com', 
        ],
    ],
    'bootstrap' => [
        'under-construction',
    ],
];

预览

Under Construction Page

许可证

BSD3-Clause