mervick/yii2-under-construction

Yii2 Under Construction Module

Installs: 1 821

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 2

Forks: 0

Open Issues: 0

Type:yii2-extension

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

This package is not auto-updated.

Last update: 2024-11-09 17:50:55 UTC


README

Analytics

The simple yii2 extension which can disallow access to website.

Installation

Via composer:

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

Usage

Add to your 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',
    ],
];

Preview

Under Construction Page

License

BSD3-Clause